home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / tools.linux / Install.ms < prev    next >
Text File  |  1994-02-20  |  100KB  |  2,504 lines

  1. .\" $Revision: 1.13 $
  2. .\" Uses the -ms macro package; e.g., "nroff -ms Install.ms | col >Install.out"
  3. .\" UX - UNIX macro
  4. .nr UX 0
  5. .de UX
  6. .ie \\n(UX \s-1UNIX\s0\\$1
  7. .el \{\
  8. \s-1UNIX\s0\\$1\(dg
  9. .FS
  10. \(dg \s-1UNIX\s0 is a registered trademark of Unix Systems Laboratories.
  11. .FE
  12. .nr UX 1
  13. .\}
  14. ..
  15. .DA "February 14, 1992"
  16. .TL
  17. Installing InterNetNews
  18. .AU
  19. Rich $alz
  20. .AI
  21. Open Software Foundation
  22. 11 Cambridge Center
  23. Cambridge, MA  02142
  24.  
  25. \fIOrganization given for identification only;\fP
  26. \fIplease send electronic mail to <rsalz@uunet.uu.net>\fP
  27. .AB
  28. This document discusses how to install and set up InterNetNews.
  29. You should be familiar with Usenet and networks; the first section gives
  30. references to documentation for these topics, and the last appendix gives
  31. a Usenet overview for novices.
  32. .PP
  33. This document also describes what many of the programs do and how they
  34. should be used.
  35. Even if you are a world-class expert at building and maintaining
  36. public software, you should probably read this.
  37. .PP
  38. .de R$
  39. This is revision \\$3, dated \\$4.
  40. ..
  41. .R$ $Id: Install.ms.1,v 1.13 1993/03/19 17:49:59 rsalz Exp $
  42. .AE
  43. .NH 1
  44. Things You Should Know Before You Do Anything
  45. .PP
  46. InterNetNews is abbreviated \fIINN\fP, which is pronounced
  47. as the three letters, \fIeye en en\fP.
  48. It is a Usenet transport and expiration system for larger
  49. .UX
  50. systems where NNTP is used for most Usenet traffic.
  51. .PP
  52. This document is not a tutorial on Usenet.
  53. If you do not have much Usenet experience, you should read
  54. \fIUsing UUCP and Usenet\fP, ISBN 0-937175-10-2.
  55. You might also find it useful to read \fIManaging UUCP and Usenet\fP
  56. (get the most recent edition available), ISBN 0-937175-48-X.
  57. Both books are published by O'Reilly & Associates; send inquiries to
  58. to <nuts@ora.com>.
  59. .PP
  60. You should know BSD-derived TCP/IP \(em at least be comfortable with host
  61. names and dotted-quad addresses.
  62. If you have installation problems, you should know about
  63. .UX -domain
  64. stream and datagram sockets and the like.
  65. In addition to any documentation available from your vendor, you might
  66. find it useful to read the two IPC tutorials in \fI
  67. .UX
  68. Programmer's Manual:  Supplementary Documents 1\fP.
  69. Copies can be purchased from the Usenix Association; send inquiries to
  70. <office@usenix.org>.
  71. .PP
  72. There are two RFCs that are important to InterNetNews.
  73. RFC 1036 describes the format of Usenet articles.
  74. It is incomplete and has some errors, but it is the only formal
  75. document available.
  76. RFC 977 defines NNTP, the Network News Transfer Protocol.
  77. RFCs are available from several places, including anonymous FTP
  78. to nnsc.nsf.net, where they can be found in the directory \fIrfc\fP.
  79. Both RFCs are currently being revised.
  80. The 1036 revision is most likely going to be a ``tightening-up''; since
  81. INN already has a strict interpretation of the RFC, this revision will
  82. probably not affect InterNetNews very much.
  83. The 977 revision is adding new features and facilities, and while INN
  84. will not provide all of them, they will have some impact.
  85. .PP
  86. InterNetNews does things differently from other news software.
  87. The most common Usenet systems for
  88. .UX
  89. are B2.11 and C News.
  90. Both of them require a separate NNTP implementation.
  91. The one everyone uses is called ``NNTP.''
  92. Because this is confusing (they don't call \fIsendmail\fP ``SMTP''), I will
  93. refer to it as the ``reference implementation.''
  94. You generally do not need to know anything about these other systems,
  95. but if you are curious, the official sites are as follows:
  96. .DS
  97. .ta \w'B2.11 News   'u +\w'ftp.cs.toronto.edu    'u
  98. Package    Host    Directory
  99. C\ News    ftp.cs.toronto.edu    pub/c-news
  100. B2.11    ftp.uu.net    news/bnews-2.11
  101. nntp    lib.tmc.edu    public
  102. .DE
  103. You might find the files \fIdoc/biblio\fP, \fIdoc/problems\fP, and
  104. \fIdoc/rfcerrata\fP in the C News distribution worthwhile reading.
  105. The first is a bibliography, the second discusses known C News porting
  106. problems (see the DBZ sections in particular, and ignore most of the shell
  107. comments), while the third lists some technical and philosophical errors
  108. in RFC 1036.
  109. .PP
  110. The commands below assume that \fI$inn\fP is an abbreviation for the
  111. top of the InterNetNews source tree.
  112. .PP
  113. INN could not have been written without access to the freely-redistributable
  114. sources of B2.11, C News, and NNTP.
  115. In particular, I want to thank Rick Adams; Geoff Collyer and Henry Spencer;
  116. and Stan Barber, Erik Fair, Brian Kantor, and Phil Lapsley.
  117. The financial support of UUNET Technologies is also greatly appreciated.
  118. The beta-test sites gave invaluable feedback.
  119. .NH 1
  120. If You Are Impatient
  121. .PP
  122. If you don't want to follow these directions, do the following:
  123. .DS
  124. cd $inn/config
  125. cp config.dist config.data
  126. chmod 644 config.data
  127. vi config.data (or emacs, or whatever)
  128. cd ..
  129. make world install
  130. .DE
  131. Then go read the appendixes.
  132. If you have any problems, read the rest of this document.
  133. .NH 1
  134. Distribution Roadmap
  135. .PP
  136. The INN sources are divided into the following directories:
  137. .IP \fIfrontends\fP 15
  138. Programs to feed articles to the central server and control it.
  139. .IP \fIinnd\fP 15
  140. The central NNTP server.
  141. It accepts incoming connections, receives articles, and arranges for
  142. them to be sent to downstream newsfeeds.
  143. .IP \fIbackends\fP 15
  144. Programs to transmit articles to other sites.
  145. .IP \fIexpire\fP 15
  146. Programs to purge the article files and history database.
  147. .IP \fInnrpd\fP 15
  148. An NNTP server for on-campus clients that do newsreading (as opposed to
  149. bulk article transfer).
  150. .IP \fIlib\fP 15
  151. Library routines used by all the above.
  152. .IP \fIinclude\fP 15
  153. Header files used by all the above.
  154. .PP
  155. The distribution also includes these directories:
  156. .IP \fIsamples\fP 15
  157. Prototype scripts and configuration files that might have to be edited
  158. before they are installed.
  159. .IP \fIsite\fP 15
  160. A place to store edited copies of the files in the \fIsamples\fP directory.
  161. .IP \fIdoc\fP 15
  162. Manual pages for all the above.
  163. .IP \fIconfig\fP 15
  164. Tools to configure the release for your site.
  165. .PP
  166. Finally, there are a handful of files in the top-level directory:
  167. .IP \fIREADME\fP 15
  168. A basic introduction.
  169. .IP \fICOPYRIGHT\fP 15
  170. The distribution copyright.
  171. InterNetNews is freely redistributable, provided proper credit is given.
  172. .IP \fIMANIFEST\fP 15
  173. A one-line description of every file in the distribution.
  174. .IP \fIBUILD\fP 15
  175. An interactive script to configure, build, and install INN.
  176. .IP \fImakedirs.sh\fP 15
  177. A script to build INN's directories.
  178. As long as you have write permission to install the programs, this is
  179. the only part of the installation that needs to be done as root.
  180. .IP \fIMakefile\fP 15
  181. Rules to call the other Makefiles and make distributions.
  182. .IP \fIInstall.ms\fP 15
  183. This document.
  184. It requires the ``\-ms'' nroff/troff macro package.
  185. .IP \fIMakeLib\fP 15
  186. Script to build a directory with a replacement of the reference
  187. implementation's ``clientlib'' routines needed by remote \fIrn\fP.
  188. .IP \fIMakeInews\fP 15
  189. Script to build an \fIinews\fP distribution directory.
  190. .IP \fIMakeRnews\fP 15
  191. Script to build an \fIrnews\fP distribution directory.
  192. .IP \fIsedf.xxx\fP 15
  193. Various \fIsed\fP scripts to filter the output of \fIlint\fP.
  194. .NH 1
  195. Building the System
  196. .PP
  197. INN is built in steps.
  198. First, the \fIsubst\fP program is built.
  199. Next, a configuration file containing key/value pairs is created.
  200. \fISubst\fP reads this file and uses it to edit a specific set of files
  201. in the INN distribution.
  202. (Most of the files that get modified are Makefiles or header files.)
  203. The library is then built; \fIlint\fP is usually a good way to see if
  204. some of the basic configuration parameters are set up right.
  205. The next step is to compile (and lint) all the programs.
  206. The programs are then installed, and the INN data files are set up.
  207. .PP
  208. The configuration process is deliberately not interactive.
  209. Configure scripts like the one in \fIrn\fP are fun to watch, but they
  210. spend too much effort on the wrong job, like whether \fIgrep\fP returns
  211. an exit status.
  212. It is also difficult to change one parameter and rebuild the software.
  213. (C News has this same problem.)
  214. .PP
  215. INN's method also has its flaws.
  216. Because almost all configuration data is in one header file, changing
  217. almost anything will force everything to be recompiled.
  218. .NH 2
  219. Building subst
  220. .PP
  221. INN uses the C News \fIsubst\fP program to automate the configuration.
  222. \fISubst\fP is a very clever way of safely editing a file under the control
  223. of a configuration file.
  224. For more details, see the documentation in \fIdoc/subst.1\fP.
  225. Thanks to Henry Spencer and Geoff Collyer for their permission to use and
  226. redistribute \fIsubst\fP.
  227. .PP
  228. We will use \fIconfig.dist\fP as the configuration file to test the
  229. version of \fIsubst\fP that you build.
  230. .\"Using this file on your INN distribution should result in no changes to
  231. .\"any files.
  232. .\"If, while doing the steps below, you see any ``updated'' messages, then
  233. .\"something is wrong with your distribution.
  234. (You can always replace your config file with the distribution file and
  235. do another \fImake\fP to restore the original versions.)
  236. .PP
  237. The C News \fIsubst\fP program is a shell script that uses \fIsed\fP to
  238. do the editing.
  239. The INN configuration file is too large for some versions of \fIsed\fP.
  240. The first step is to see if your \fIsed\fP will work.
  241. To do this, type the following:
  242. .DS
  243. cd $inn/config
  244. cp config.dist config.data
  245. make sedtest
  246. .DE
  247. If you get any error messages from \fIsed\fP such as ``too much command
  248. text'' (or if it dumps core) you have two choices.
  249. (You should also complain to your vendor.)
  250. One choice is to use another version of \fIsed\fP, such as the one
  251. distributed by the Free Software Foundation.
  252. If you do this, edit \fIconfig/Makefile\fP and change the line that
  253. defines the SED variable.
  254. If you want to use the C News script, then do the following:
  255. .DS
  256. cd $inn/config
  257. make sh
  258. .DE
  259. .PP
  260. The other choice is to use the C version of \fIsubst\fP.
  261. You might want to do this anyway, since it can be much faster.
  262. To do this, type the following:
  263. .DS
  264. cd $inn/config
  265. cp config.dist config.data
  266. make c quiet
  267. .DE
  268. If you get any compilation errors, you will have to edit the file
  269. \fIconfig/subst.c\fP.
  270. If you are using an early version of AFS, you will have edit the file
  271. to enable the USE_RENAME macro.
  272. If you have to make any other changes, please let me know.
  273. .PP
  274. Since \fIsubst\fP changes source files, you might want to make a
  275. backup copy of all the files that will be modified.
  276. You can do this by typing ``make backup'' in the \fIconfig\fP
  277. directory.
  278. This will create a local tar file that contains all the files that will
  279. be modified into it.
  280. Doing ``make restore'' will unpacks the tar file.
  281. (Since \fIsubst\fP makes its changes safely, this step is optional.)
  282. .NH 2
  283. Editing config.data
  284. .PP
  285. Once you have \fIsubst\fP working, the next step is to set up your
  286. configuration parameters.
  287. This is the hardest part of installing INN.
  288. \fIDon't panic!\fP
  289. There are many configuration parameters, but it should be very easy
  290. for you to determine the answer for most of them.
  291. To do this, you should copy \fIconfig/config.dist\fP, the distribution
  292. master, to \fIconfig/config.data\fP, your local copy.
  293. INN is distributed to compile and run under SunOS4.1 (without using
  294. <unistd.h> and other POSIX facilities) by default.
  295. .PP
  296. The configuration file is divided into the following sections:
  297. .DS
  298. Make config parameters
  299. Logging levels         
  300. Ownerships and file modes
  301. C library differences
  302. C library omissions
  303. Miscellaneous config data
  304. Paths to common programs
  305. Paths related to the spool directory
  306. Execution paths for innd and rnews
  307. Sockets created by innd or clients
  308. Log and config files
  309. Innwatch configuration
  310. .DE
  311. You should have a copy of \fIconfig.data\fP nearby as you read the next
  312. few sections.
  313. It is probably a good idea to write down your changes on paper before
  314. you edit the file.
  315. .PP
  316. The format of the file is very strict.
  317. A line starting with a poundsign is a comment line.
  318. All other lines must be in this format:
  319. .DS
  320. parameter \fI<one-or-more-tabs>\fP value
  321. .DE
  322. If there is no ``value'' the ``<one-or-more-tabs>'' is still required.
  323. Do not put quote marks around the values \(em if you do, you will usually
  324. get a syntax error while compiling the system.
  325. The discussion below uses quotes only to show where the values start and end.
  326. .NH 3
  327. Make config parameters
  328. .PP
  329. This section is used primarily to identify the path to your C compiler,
  330. and what extra libraries or command-line switches are needed.
  331. For example, you could put \fIgcc \-Wall\fP on the \fICC\fP line.
  332. If you need extra \fI\-I\fP flags put them on the \fIDEFS\fP line.
  333. INN uses the \fIregister\fP declaration a great deal.
  334. If your compiler is very good, you might want to add \fI\-Dregister=\fP
  335. to the \fIDEFS\fP line so that INN's declarations are ignored.
  336. .PP
  337. The DBZ package can be compiled so that the database is memory-mapped.
  338. If you want to do this and have the \fImmap\fP system call, then add
  339. ``\-DMMAP'' to the \fIDBZCFLAGS\fP parameter.
  340. .PP
  341. If you need to link in other libraries (e.g., \fI\-lnet\fP) put them
  342. on the \fILIBS\fP line.
  343. .\".PP
  344. .\"INN can be built with Conor Cahill's ``debug_malloc'' package.
  345. .\"Add ``-D_DEBUG_MALLOC_INC\ -Ixxx'' to the \fIDEFS\fP line, where \fIxxx\fP
  346. .\"is the path to the debug package.
  347. .\"You will also have to add the appropriate ``libdbmalloc'' value to the
  348. .\"\fILIBS\fP parameter.
  349. .PP
  350. The Makefiles usually filter all \fIlint\fP output through a \fIsed\fP
  351. script.
  352. If you are very paranoid, set \fILINTFILTER\fP to \fIcat\fP.
  353. If your lint output is in the broken multi-line format:
  354. .DS
  355. value type declared inconsistently
  356.     exit        llib-lc(297) :: test.c(7)
  357. function returns value which is always ignored
  358.     printf
  359. .DE
  360. Then set \fILINTFILTER\fP to be the ``sedf.sysv'' line.
  361. .PP
  362. The \fIlib\fP directory also builds a \fIlint\fP library, so that
  363. you can make sure the other programs are properly using the library
  364. routines.
  365. The \fILINTLIBSTYLE\fP parameter (used in \fIlib/Makefile\fP and
  366. \fIlib/makellib.sh\fP) controls how the \fIlint\fP library is built.
  367. If your \fIlint\fP understands the ``\-C'' flag, then set it to ``BSD''.
  368. If you need the ``\-o'' flag to build a library, then set it to ``SYSV''.
  369. If neither of these work, you can set it to ``NONE''; this will just
  370. create an empty file so that the other Makefiles don't break.
  371. If you come up with a fourth alternative, let me know.
  372. .PP
  373. Unfortunately, on some systems \fIlint\fP is all but useless, so complain
  374. to your vendor and take the output with a grain of salt.
  375. You might get some warnings about ``struct\ _DDHANDLE'' being undefined.
  376. You can ignore them and ask your vendor to support the BSD ``\-z'' lint flag.
  377. If you set \fIHAVE_UNISTD\fP to ``DO'' then you might get warnings
  378. about prototype mismatches for various functions declared in
  379. \fIinclude/clibrary.h\fP.
  380. You can ignore them or remove the lines from the INN header file.
  381. .PP
  382. The \fIMANPAGESTYLE\fP parameter (used in \fIdoc/Makefile\fP and
  383. \fIdoc/putman.sh\fP) controls how manual pages are installed into your
  384. public directory while the \fIMANx\fP parameters specify the directories
  385. where they get installed.
  386. If you do not want to install any manpages, set \fIMANPAGESTYLE\fP to
  387. \fINONE\fP.
  388. .NH 3
  389. Logging levels
  390. .PP
  391. INN uses the modern \fIsyslog\fP that separates messages into both
  392. levels and categories.
  393. Look in your \fI<syslog.h>\fP header file for a ``LOG_NEWS'' macro,
  394. and check your \fIsyslog\fP(3) manpage to make sure that \fIopenlog\fP
  395. takes three arguments.
  396. If it doesn't, then you will have to use the library routine and server
  397. provided in the \fIsyslog\fP directory.
  398. This is described later.
  399. .PP
  400. The different levels that are described in the \fIsyslog\fP(3) manpage
  401. are confusing, so INN uses its own names for the four levels it uses:
  402. .DS
  403. .nf
  404. .ta \w'L_NOTICE  'u
  405. L_FATAL    Fatal error, about to exit
  406. L_ERROR    Error that might require attention
  407. L_NOTICE    Informational notice, no action needed
  408. L_DEBUG    Protocol tracing or other debugging messages
  409. .fi
  410. .DE
  411. Depending on how your \fIsyslog.conf\fP(5) file is set up, you might want
  412. to change the \fIL_xxx\fP parameters in this section.
  413. .PP
  414. The \fIscanlogs\fP script assumes that the first three categories above
  415. are each directed into separate files.
  416. See \fIdoc/newslog.5\fP, \fIdoc/newslog.8\fP, and \fIsyslog/syslog.conf\fP
  417. for details.
  418. Logging is also described in more detail later.
  419. .NH 3
  420. Ownerships and file modes
  421. .PP
  422. The NNTP server needs to open the NNTP port; it is port number 119,
  423. which requires root access.
  424. This is the only part of INN that needs this privilege: all other programs
  425. can run under the distinct user and group id specified by the \fINEWSUSER\fP
  426. and \fINEWSGROUP\fP parameters.
  427. Most news administration tasks must be done as user \fINEWSUSER\fP (see the
  428. explanation of \fIctlinnd\fP below).
  429. In addition, \fIinews\fP will only let the \fINEWSUSER\fP user or members of
  430. the \fINEWSGROUP\fP group post control messages other than cancel.
  431. .PP
  432. Some INN scripts (primarily the control message scripts and the
  433. daily maintenance script) need to send email to the news maintainer.
  434. The \fINEWSMASTER\fP parameter specifies the right address.
  435. This is most often the login name of the account which has
  436. \fINEWSUSER\fP as its user id; use an alias to forward it to the right people.
  437. .PP
  438. Some Usenet sites still use the Path header line to generate their email reply
  439. messages.
  440. Using the Path has never been guaranteed to work, and INN tries to help
  441. stop this practice by refusing to generate valid Path addresses.
  442. The \fIPATHMASTER\fP parameter specifies what \fIinews\fP should put
  443. at the tail end of the Path line.
  444. If your \fINEWSMASTER\fP mailbox is getting cluttered, then you might
  445. want to change this to be an alias that rejects the message or drops it
  446. into the bit-bucket.
  447. The default value is ``not-for-mail'' which usually results in bounced
  448. email.
  449. .PP
  450. The \fIxxx_MODE\fP parameters specify the permissions for articles and
  451. directories created within the spool area, and the active file, all of
  452. which are owned by user id \fINEWSUSER\fP.
  453. .NH 3
  454. C library differences
  455. .PP
  456. Editing the parameters in this section will require you to look
  457. around at the files in your \fI/usr/include\fP directory.
  458. .PP
  459. The \fISIZE_T\fP parameter is the datatype of the ``size'' parameters
  460. in subroutine calls like \fImemchr\fP and \fIfread\fP.
  461. The \fILOCK_STYLE\fP parameter specifies how file-locking should be done.
  462. \fIInnxmit\fP is the only program that locks files; if you use the provided
  463. scripts, this isn't even necessary, so you can set this to ``NONE'' if you
  464. have any compile problems.
  465. .PP
  466. The \fIDIR_STYLE\fP parameter specifies what is returned by your
  467. \fIreaddir\fP(3) routine.
  468. This will be either a ``struct\ direct'' or a ``struct\ dirent'';
  469. set the parameter to ``DIRECT'' or ``DIRENT'' as appropriate.
  470. .PP
  471. If you do not have
  472. .UX -domain
  473. sockets, set \fIHAVE_UNIX_DOMAIN\fP to ``DONT.''
  474. This means that INN will use a named pipe for the communication
  475. between \fIinnd\fP and \fIctlinnd\fP.
  476. It also means that there will be no local ``private'' port for \fIrnews\fP
  477. to use; this should not cause any problems, although it makes it
  478. easier for anyone to use \fIrnews\fP and post fake news articles.
  479. (You might also have to modify the \fIsyslog\fP routines; see the end of
  480. the file \fIsyslog/README\fP for details on this.)
  481. .PP
  482. INN needs to know how many descriptors are available to use for files
  483. and sockets.
  484. There are several ways to get this number; the \fIFDCOUNT_STYLE\fP
  485. parameter specifies which method to use.
  486. On most systems, the \fIgetdtablesize\fP routine will do this, so
  487. leave the default of ``GETDTAB.''
  488. On other systems you need to use the \fIgetrlimit\fP, \fIsysconf\fP or
  489. \fIulimit\fP routine, so set the parameter to ``GETRLIMIT'', ``SYSCONF'',
  490. or ``ULIMIT'', respectively.
  491. If you do not have any of those calls then set the parameter to ``CONSTANT''
  492. and edit the file \fIlib/getdtab.c\fP to return the right number.
  493. To get this number, look for an \fIOPEN_MAX\fP constant in your system header
  494. files, or write a program that repeatedly opens \fI/dev/null\fP until
  495. it gets an error.
  496. .PP
  497. The last few parameters in this section, \fIxxxVAL\fP, are used primarily
  498. to keep \fIlint\fP quiet.
  499. These functions are declared in \fIinclude/clibrary.h\fP, and the return
  500. values are pretty much always ignored.
  501. You can usually determine what these values should be by examining
  502. your manpages or your \fIlint\fP libraries.
  503. .NH 3
  504. C library omissions
  505. .PP
  506. INN uses library routines that might not be present in all
  507. .UX
  508. systems, although they should be.
  509. The \fIlib\fP directory provides versions of some of these routines,
  510. including copies of the freely-redistributable BSD string routines.
  511. The \fIMISSING_SRC\fP and \fIMISSING_MAN\fP parameters can be set to
  512. list those routines that are missing from your C library.
  513. If you don't have \fIstrcasecmp\fP and \fIstrncasecmp\fP then you will
  514. need the \fIstrcasecmp\fP module built into your INN library.
  515. Add the ``.c'' and ``.o'' names to \fIMISSING_SRC\fP and \fIMISSING_OBJ\fP,
  516. respectively.
  517. .PP
  518. The following routines are all found in the file of the same name.
  519. If they are missing from your system, add them the same way:
  520. .DS
  521. .ta 1.5i +1.5i
  522. memchr    strchr    getopt
  523. memcmp    strrchr    mkfifo
  524. memcpy    strspn    strerror
  525. memset    strtok
  526. .DE
  527. .PP
  528. If you are using version 1 of the GNU C compiler on a Sparc running SunOS,
  529. you should add \fIinet_ntoa\fP as a missing function.
  530. This is because the first version of \fIgcc\fP didn't properly pass
  531. structures into routines compiled with the Sun C compiler.
  532. .PP
  533. If you have an older version of \fIsyslog\fP add \fIsyslog.c\fP and
  534. \fIsyslog.o\fP to the appropriate parameters.
  535. .PP
  536. Pyramid machines running OSx have fast assembly-language versions of the
  537. string routines in the ATT library.
  538. To use these routines, add ``$(OSXATTOBJ)'' to the \fIMISSING_OBJS\fP
  539. parameter.
  540. This will cause \fIlib/Makefile\fP to extract the object files from the ATT
  541. library, and add them to the INN library.
  542. .NH 3
  543. Miscellaneous config data
  544. .PP
  545. All the parameters in this section become macros in the file
  546. \fIinclude/configdata.h\fP.
  547. You should at least look through the parameters up to \fIVERIFY_CANCELS\fP.
  548. (If set to ``DO'', then \fIinnd\fP will ignore cancel messages unless
  549. the From or Sender header match those of the original poster.)
  550. In general, however, you can leave this section pretty much alone until you
  551. have some experience running INN.
  552. Nevertheless, here are some comments on some of the more useful parameters.
  553. .PP
  554. \fIInnd\fP can memory-map the \fIactive\fP file if you set
  555. \fIACT_STYLE\fP to ``MMAP''.
  556. On some systems, however, when a mapped file is updated its mtime is
  557. not updated.
  558. Apparently some versions of System V Release 4 have this problem.
  559. This causes problems for programs like \fInnmaster\fP which look at the
  560. \fIst_mtime\fP field of the \fIstat\fP structure in order to determine if
  561. any new news has come in.
  562. (\fINnmaster\fP is part of the \fInn\fP newsreading program.)
  563. The best work-around is probably an hourly \fIcron\fP job that touches the
  564. \fIactive\fP file.
  565. .PP
  566. There are a number of parameters that control the behavior of \fIrnews\fP.
  567. If you set \fIRNEWS_SAVE_BAD\fP to ``DO'' then articles that \fIinnd\fP
  568. rejects for reasons like bad headers will be saved in the \fI_PATH_BADNEWS\fP
  569. directory; you will have to periodically scan this directory and clean
  570. it up.
  571. You can also control how \fIrnews\fP logs duplicates (those aren't saved
  572. regardless of the value of \fIRNEWS_SAVE_BAD\fP), logging them through
  573. \fIsyslog\fP, to a file, or not.
  574. Note that if you set \fIRNEWS_LOG_DUPS\fP to ``FILE'', then you will want
  575. to change \fI_PATH_RNEWS_DUP_LOG\fP, which appears later in the file.
  576. If you receive news from several UUCP feeds, you might want to log duplicates
  577. so that you can cut down your phone bills by optimizing your feeds.
  578. The \fIRNEWSPROGS\fP parameter says whether or not to look in
  579. \fI_PATH_NEWSPROGS\fP for commands named on the incoming ``#!'' line of
  580. news batches.
  581. You probably want to set this to ``DO''.
  582. Make sure that the full pathname of \fIrnews\fP, \fI_PATH_RNEWS\fP,
  583. does not conflict with the directory where your unpackers are put,
  584. \fI_PATH_NEWSPROGS\fP.
  585. .PP
  586. If \fIIPADDR_LOG\fP is set to ``DO'' then the news log will report the IP
  587. address of hosts that send articles, rather then what they put in the Path
  588. line.
  589. This can be useful if you run \fIinnd\fP with the ``\-a'' flag.
  590. (If you do this, you might want to pick up ``hf.tar.Z'' via anonymous
  591. FTP to ee.lbl.gov; it is a filter that turns IP addresses into host names.)
  592. .PP
  593. The \fIxxx_TIMEOUT\fP parameters control various timers within INN;
  594. you might want to change some of these depending on your system load.
  595. .NH 3
  596. Paths to common programs
  597. .PP
  598. INN uses a few standard programs like \fI/bin/sh\fP and \fIsendmail\fP.
  599. If you don't have \fIsendmail\fP then you must have a program that
  600. accepts a full message \(em including headers \(em on its standard input,
  601. and delivers it.
  602. This program is specified by the \fI_PATH_SENDMAIL\fP parameter, and
  603. is normally ``/usr/lib/sendmail\ -t''.
  604. The parameter is actually a \fIsprintf\fP format string that will be
  605. given the destination address as its only argument.
  606. on some sites (e.g., those running MMDF) the ``\-t'' could be replaced
  607. with a ``%s''.
  608. .PP
  609. INN puts most of its executables in the directory specified by the
  610. \fI_PATH_NEWSBIN\fP parameter.
  611. Some programs expect \fIinews\fP and \fIrnews\fP to be in certain places;
  612. for example, UUCP usually wants \fIrnews\fP in \fI/bin\fP.
  613. The default configuration puts these programs in only one spot; if you
  614. need to have multiple links to the same file, you will have to do it
  615. yourself after INN is installed.
  616. If you have additional scripts and programs that you use to maintain your
  617. system, you can put them in whatever directory you want.
  618. You will probably need to add \fI_PATH_NEWSBIN\fP to the PATH of any
  619. such scripts.
  620. .PP
  621. If you have an \fI/etc/rc.local\fP file you should make sure that
  622. it invokes the script named by the \fI_PATH_NEWSBOOT\fP parameter.
  623. On other systems (mostly System V derivatives), the system boot procedure
  624. automatically runs all the scripts in a particular directory, such as
  625. \fI/etc/init.2\fP.
  626. In that case, you should pick a name like \fI/etc/init.2/S99news\fP and
  627. have the news boot script installed there, or install it in the default
  628. \fI/etc/rc.news\fP and make the link yourself.
  629. .PP
  630. The daily maintenance script, \fInews.daily\fP calls \fIscanlogs\fP
  631. to rotate and trim log files, as well as generating summaries using
  632. \fIegrep\fP and \fIawk\fP.
  633. On some systems the log files are too big for these programs so you
  634. might have to complain to your vendor and install the versions from
  635. the Free Software Foundation.
  636. The \fIscanlogs\fP script has a short test you can run to see if your
  637. \fIegrep\fP will work.
  638. .NH 3
  639. Paths related to the spool directory
  640. .PP
  641. By default, all news articles are stored in directories under
  642. \fI/usr/spool/news\fP.
  643. Be careful if you pick a different value \(em many newsreaders know
  644. about this directory name.
  645. .PP
  646. INN uses a trick (which I first saw in C News) that lets it use this same
  647. directory to store its incoming news (spooled by \fIrnews\fP when
  648. \fIinnd\fP is not available), and its outgoing batch files.
  649. Since no newsgroup can ever have a dot in its name, a directory like
  650. \fIout.going\fP can never be a newsgroup name, and it is safe to
  651. put the news batchfiles in there.
  652. This is used by the \fI_PATH_SPOOLNEWS\fP parameter, and the
  653. \fI_PATH_BATCHDIR\fP parameter.
  654. .PP
  655. Do not make \fI_PATH_LOCKS\fP be in the same filesystem as
  656. \fI_PATH_SPOOLNEWS\fP.
  657. If you do this, then INN will not be able to create any lock files when
  658. your spool directory is full.
  659. This will probably mean that \fInews.daily\fP will not be able to run
  660. and that it won't call \fIexpire\fP to free up disk space.
  661. You should also put \fI_PATH_NEWSLIB\fP on a separate partition if you
  662. can, but that is not as important because it tends to fill up less often.
  663. .PP
  664. If you change parameters in this section a great deal, then there is a chance
  665. that the \fImakedirs.sh\fP script will fail because some needed
  666. intermediate directories will not exist.
  667. This should not be a problem, as you can just create the directories
  668. yourself \(em make sure to set the ownership and modes right \(em and
  669. re-run the script.
  670. .NH 3
  671. Execution paths for innd and rnews
  672. .PP
  673. All control messages (other then ``cancel'') are carried out by scripts.
  674. Your system must be able to \fIexec\fP shell scripts directly.
  675. All the scripts distributed with INN start with ``#!\ /bin/sh.''
  676. .PP
  677. The \fI_PATH_CONTROLPROGS\fP parameter specifies the directory where
  678. these scripts exist.
  679. Do not set this to a public directory like \fI/bin\fP because some bozo
  680. might send out an ``rm'' control message.
  681. .PP
  682. The \fI_PATH_RNEWSPROGS\fP directory serves the same purpose for \fIrnews\fP
  683. when it needs to unpack batches.
  684. The \fIRNEWSPROGS\fP parameter specifies if the directory is really used.
  685. .NH 3
  686. Sockets created by innd or clients
  687. .PP
  688. The \fIinnd\fP server and its clients (most notably \fIctlinnd\fP)
  689. create
  690. .UX -domain
  691. sockets or named pipes.
  692. They are created inside a ``firewall'' directory that gives access permission
  693. to a limited set of users.
  694. For example, assume the directory is \fI/usr/local/news/innd\fP and that it
  695. is owned by user news in group news and has mode 0770.
  696. Using these permissions, then only members of the news group can use
  697. \fIctlinnd\fP to create new groups because only they will be able to
  698. send a message to the \fIinnd\fP socket.
  699. .PP
  700. This directory (which is specified by the \fI_PATH_INNDDIR\fP parameter)
  701. is also used to determine the user and group id of all sub-processes spawned
  702. by \fIinnd\fP, as well as the owner of all news articles and files.
  703. The owner of this directory is set at installation time and specified in
  704. the ``Ownerships and file modes'' section, above.
  705. .NH 3
  706. Log and config files
  707. .PP
  708. INN keeps its databases, and some control files their own directory,
  709. typically named \fI/usr/local/news\fP.
  710. Log files are kept in \fI/var/log/news\fP.
  711. There are many parameters in this section that refer to files within
  712. this directory.
  713. Some sites will want to globally replace ``/usr/local/news'' with something
  714. like ``/var/news'', and ``/usr/lib/newsbin'' with ``/var/newsbin''
  715. .PP
  716. There are two files that contain access passwords,
  717. \fI_PATH_NNTPPASS\fP and \fI_PATH_NNRPACCESS\fP.
  718. The default location for these files is in \fI/usr/local/etc\fP, so that it is
  719. generally safe to export \fI/usr/local/news\fP (read-only is probably best).
  720. .PP
  721. INN programs do extensive logging, and the daily maintenance scripts
  722. do extensive summary reports and analysis of them.
  723. It might take you some time to learn your way around the INN logging system;
  724. start by reading the newslog manpages in the \fIdoc\fP directory.
  725. .NH 3
  726. Innwatch configuration
  727. .PP
  728. The INN server, \fIinnd\fP, does not contain any checks to see if there
  729. is enough free space on the disk or if the system load average is low enough
  730. to allow article reception.
  731. There are two reasons for this.
  732. The first reason is philosophical:  it is a mistake to bury this kind of policy
  733. information inside a program.
  734. For example, you don't want to have to recompile the program just
  735. because you moved to a different filesystem.
  736. (Yes, this could be partially answered by moving the information to an
  737. external config file, but any compiled rules are still likely to be
  738. incomplete.)
  739. The second reason is pragmatic:  there is no portable way to get standard
  740. measurements for the information needed.
  741. For example, C News provides three different routines to get the filesystem
  742. statistics (with conditional compilation) while the ``get load average''
  743. file in IDA sendmail has over 700 lines.
  744. .PP
  745. Rather than get tangled up in such a mess of #ifdef's, INN uses an
  746. external program (shell script) that invokes \fIctlinnd\fP to stop and start the
  747. server as necessary.
  748. The program, \fIinnwatch\fP, reads the control file \fIinnwatch.ctl\fP.
  749. \fIInnwatch\fP is documented in \fIdoc/news.daily.8\fP, while \fIinnwatch.ctl\fP
  750. is documented in \fIdoc/innwatch.ctl.5\fP.
  751. .PP
  752. The parameters in this section control when the server should stop accepting
  753. articles, and when it should start again.
  754. You will have to examine \fIsite/innwatch.ctl\fP and probably modify it,
  755. usually to check the amount of free space on the disks.
  756. For example, there is a line in the file that has this fragment in it:
  757. .DS
  758. !!! df . | awk 'NR == 2 { print $4 }' ! ...
  759. .DE
  760. This is looking at the fourth field of the second line to get the amount
  761. of freespace.
  762. You will have to change the ``2'' and ``4'' here, and on other lines, as
  763. appropriate for your system.
  764. (Changing the output of \fIdf\fP seems to be one of the things vendors like
  765. to do most; it is not worth my time to have INN keep track of all of them.)
  766. .PP
  767. The parameter \fIINNWATCH_SLEEPTIME\fP specifies how frequently
  768. \fIinnwatch\fP should check the system \(em the other parameters should
  769. be set with this in mind, eg: there needs to be enough free space on the
  770. filesystem to last the next \fIINNWATCH_SLEEPTIME\fP seconds.
  771. .PP
  772. The \fIINNWATCH_xxxLOAD\fP parameters specify the load average at
  773. which different actions should be taken.
  774. They are integers, representing the load average multipled by 100.
  775. For example, if you want to throttle the server when your load reaches
  776. 7.5, set \fIINNWATCH_HILOAD\fP to ``750.''
  777. .PP
  778. The \fIINNWATCH_xxxSPACE\fP parameters specify the minimum amount of disk
  779. space needed for each of INN's three major filesystems.
  780. The numbers are in ``local units,'' equivalent to whatever your \fIdf\fP
  781. uses (512-byte units, 1K blocks, etc).
  782. .PP
  783. The \fIINNWATCH_SPOOLNODES\fP parameter specifies how many inodes must
  784. be available in your spool directory.
  785. .NH 2
  786. Typical config.data changes
  787. .PP
  788. The following sections show some of the changes that need to be made to
  789. \fIconfig.data\fP so that INN will compile.
  790. They are only samples; ``your mileage may vary.''
  791. .PP
  792. Note that if you are using the first release of \fIgcc2\fP, set
  793. \fIUSE_CHAR_CONST\fP to ``DONT''.
  794. .PP
  795. .DS
  796. .UL "AIX"
  797. .ta \w'HAVE_ST_BLKSIZE   'u
  798. DEFS    -I../include -D_NO_PROTO -U__STR__
  799. FORK    fork
  800. FREEVAL    void
  801. FUNCTYPE    int
  802. HAVE_ST_BLKSIZE    DONT
  803. HAVE_TM_GMTOFF    DONT
  804. LDFLAGS    
  805. LINTFILTER    | sed -n -f ../sedf.aix
  806. LINTFLAGS    -wkD -b -h $(DEFS)
  807. LINTLIBSTYLE    SYSV
  808. LOCK_STYLE    FNCTL
  809. MISSING_MAN    
  810. MISSING_SRC    
  811. NEED_TIME    DO
  812. POINTER    void
  813. .DE
  814. Under AIX 3.1, you must also use the \fIsyslog\fP that comes with INN.
  815. This is not necessary for 3.2.
  816. Some versions also need \USE_UNION_WAIT\fP set to ``DONT''.
  817. .PP
  818. .DS
  819. .UL "A/UX"
  820. .ta \w'HAVE_ST_BLKSIZE   'u
  821. LIBS    -lbsd
  822. .DE
  823. Make sure you don't use \fIgcc\fP version 1; it miscompiles the socket calls
  824. in \fIinnd/cc.c\fP.
  825. .PP
  826. .DS
  827. .UL "BSDI"
  828. ABORTVAL    void
  829. ALARMVAL    u_int
  830. EXITVAL    volatile void
  831. _EXITVAL    volatile void
  832. FREEVAL    void
  833. GETPIDVAL    pid_t
  834. GID_T    gid_t
  835. HAVE_UNISTD    DO
  836. HAVE_VFORK    DONT
  837. HAVE_WAITPID    DO
  838. LSEEKVAL    off_t
  839. MISSING_OBJ    
  840. MISSING_SRC    
  841. _PATH_COMPRESS    /usr/bin/compress
  842. _PATH_EGREP    /usr/bin/egrep
  843. _PATH_MAILCMD    /usr/bin/Mail
  844. _PATH_SENDMAIL    /usr/sbin/sendmail -t
  845. PID_T    pid_t
  846. POINTER    void
  847. QSORTVAL    void
  848. SIZE_T    size_t
  849. SLEEPVAL    u_int
  850. UID_T    uid_t
  851. USE_UNION_WAIT    DONT
  852. VAR_STYLE    STDARGS
  853. .DE
  854. Change the \fISHELL\fP variable in \fIconfig/Makefile\fP and
  855. \fIsite/Makefile\fP to point to \fI/usr/contrib/bin/bash\fP.
  856. Edit \fIlib/Makefile\fP so that the \fIinstall\fP target does not
  857. try to make \fI../llib-linn.ln\fP.
  858. You must also use the GNU \fIsed\fP; the version distributed with
  859. BSDI 0.9.4.1 enters an infinite loop processing newgroup messages.
  860. .PP
  861. .DS
  862. .UL "HP-UX 8.0"
  863. .ta \w'HAVE_ST_BLKSIZE   'u
  864. ABORTVAL    void
  865. ALARMVAL    unsigned int
  866. CLX_STYLE    FCNTL
  867. CTYPE    isXXXXX((c))
  868. DEFS    -I../include -DHPUX
  869. FDCOUNT_STYLE    SYSCONF
  870. FREEVAL    void
  871. GETPIDVAL    pid_t
  872. GID_T    gid_t
  873. HAVE_SETBUFFER    DONT
  874. HAVE_ST_BLKSIZE    DONT
  875. HAVE_TM_GMTOFF    DONT
  876. HAVE_UNISTD    DO
  877. HAVE_WAITPID    DO
  878. LINTFILTER    | sed -n -f ../sedf.sysv
  879. LINTFLAGS    -b -h $(DEFS)
  880. LINTLIBSTYLE    SYSV
  881. LOCK_STYLE    LOCKF
  882. LOG_INN_PROG    LOG_LOCAL7
  883. LOG_INN_SERVER    LOG_LOCAL7
  884. LSEEKVAL    off_t
  885. _PATH_MAILCMD        /usr/bin/mailx
  886. NOFILE_LIMIT    200
  887. PID_T    pid_t
  888. POINTER    void
  889. PROF    
  890. QSORTVAL    void
  891. RANLIB    echo
  892. RES_STYLE    TIMES
  893. SIZE_T    size_t
  894. SLEEPVAL    unsigned int
  895. UID_T    uid_t
  896. USE_UNION_WAIT    DONT
  897. _EXITVAL    void
  898. .DE
  899. You will probably also need to use the \fIbdf\fP command instead of \fIdf\fP.
  900. .PP
  901. .DS
  902. .UL "SGI Indigo with IRIX 4.0.1"
  903. .ta \w'HAVE_ST_BLKSIZE   'u
  904. ABORTVAL    void
  905. ALARMVAL    uint
  906. ACT_STYLE    MMAP
  907. CFLAGS    $(DEFS) -g -w
  908. CLX_STYLE    FCNTL
  909. _EXITVAL    void
  910. FORK    fork
  911. FREEVAL    void
  912. GID_T    gid_t
  913. HAVE_ST_BLKSIZE    DONT
  914. HAVE_TM_GMTOFF    DONT
  915. HAVE_UNISTD    DO
  916. LDFLAGS    
  917. LIBS    -lmld
  918. LINTFILTER    | sed -n -f ../sedf.sysv
  919. LINTFLAGS     $(DEFS)
  920. LINTLIBSTYLE    SYSV
  921. LSEEKVAL    off_t
  922. POINTER    void
  923. QSORTVAL    void
  924. RANLIB    echo
  925. SIZE_T    size_t
  926. SLEEPVAL    uint
  927. UID_T    uid_t
  928. _PATH_COMPRESS    /usr/bsd/compress
  929. .DE
  930. Also, the \fIMISSING_xxx\fP parameters should be empty.
  931. .PP
  932. .DS
  933. .UL "Solaris 2.X/SunOS 5.X, using SPARCompiler C 2.X"
  934. .ta \w'HAVE_ST_BLKSIZE   'u
  935. DEFS    -I../include -DSUNOS5
  936. USE_CHAR_CONST        DO
  937. CFLAGS    -O -Xa $(DEFS)
  938. LDFLAGS
  939. LIBS    -lnsl -lsocket -lelf
  940. LINTLIBSTYLE    SYSV
  941. LINTFLAGS    -b -h $(DEFS)
  942. LINTFILTER    | sed -n -f ../sedf.sysv
  943. RANLIB    echo
  944. VAR_STYLE    STDARGS
  945. SIZE_T    size_t
  946. UID_T    uid_t
  947. GID_T    gid_t
  948. PID_T    pid_t
  949. POINTER    void
  950. ALIGNPTR    long
  951. LOCK_STYLE    LOCKF
  952. HAVE_UNISTD    DO
  953. HAVE_SETSID    DO
  954. HAVE_TM_GMTOFF    DONT
  955. HAVE_WAITPID    DO
  956. USE_UNION_WAIT    DONT
  957. HAVE_VFORK    DONT
  958. HAVE_UNIX_DOMAIN    DONT
  959. CLX_STYLE    FCNTL
  960. RES_STYLE    TIMES
  961. FDCOUNT_STYLE    SYSCONF
  962. ABORTVAL    void
  963. ALARMVAL    unsigned
  964. GETPIDVAL    pid_t
  965. SLEEPVAL    unsigned
  966. QSORTVAL    void
  967. LSEEKVAL    off_t
  968. FREEVAL        void
  969. _EXITVAL    void
  970. MISSING_SRC        
  971. MISSING_OBJ        
  972. PATH_COMPRESS    /bin/compress
  973. .DE
  974. Make sure you use the C version of subst.
  975. .PP
  976. .DS
  977. .UL "System V Release 4"
  978. .ta \w'HAVE_ST_BLKSIZE   'u
  979. FREEVAL    void
  980. GETPIDVAL    long
  981. HAVE_TM_GMTOFF    DONT
  982. HAVE_WAITPID    DO
  983. LDFLAGS
  984. LIBS    -lnsl -lsocket
  985. LINTFILTER    | sed -n -f ../sedf.sysv
  986. LINTFLAGS    -b -h $(DEFS)
  987. LINTLIBSTYLE    NONE
  988. LOCK_STYLE    FCNTL
  989. MANPAGESTYLE    NONE
  990. MISSING_MAN    strcasecmp.3
  991. MISSING_OBJ    strerror.o strcasecmp.o
  992. MISSING_SRC    strerror.c strcasecmp.c
  993. _PATH_MAILCMD        /usr/bin/mailx
  994. POINTER    void
  995. QSORTVAL    void
  996. RANLIB
  997. RES_STYLE    TIMES
  998. SIZE_T    unsigned int
  999. USE_CHAR_CONST    DONT
  1000. USE_UNION_WAIT    DONT
  1001. .DE
  1002. I was never able to get \fIlint\fP to be useful on the machine I used.
  1003. Some versions of System V (for example, Esix 4.0.3) need the following
  1004. LIBS value:
  1005. .DS
  1006. .ta \w'HAVE_ST_BLKSIZE   'u
  1007. LIBS    -lresolv -lsocket -lnsl -L/usr/ccs/lib -lelf
  1008. .DE
  1009. On a Dell System V machine, you have to set \fIHAVE_UNIX_DOMAIN\fP to ``DONT.''
  1010. .PP
  1011. .DS
  1012. .UL "Ultrix 4.x (RISC)"
  1013. .ta \w'HAVE_ST_BLKSIZE   'u
  1014. ALARMVAL    unsigned int
  1015. FREEVAL    void
  1016. LDFLAGS
  1017. LINTFILTER    | sed -n -f ../sedf.sysv
  1018. LINTFLAGS    -b -u -x $(DEFS)
  1019. LSEEKVAL    off_t
  1020. MISSING_MAN    
  1021. MISSING_OBJ    syslog.o strerror.o
  1022. MISSING_SRC    syslog.c strerror.c
  1023. POINTER    void
  1024. PROF    -p
  1025. QSORTVAL    void
  1026. SIZE_T    unsigned int
  1027. SLEEPVAL    unsigned int
  1028. _EXITVAL    void
  1029. .DE
  1030. Ultrix also requires the new \fIsyslog\fP.
  1031. Some sites have reported problems with using the \fIsyslog\fP that INN includes.
  1032. The file \fIjtkohl-syslog-complete.tar.Z\fP in the \fI/pub/DEC\fP
  1033. directory on gatekeeper.dec.com has a ``for-Ultrix'' package that handles
  1034. both old and new \fIsyslog\fP calls.
  1035. While Ultrix has symlinks, it does not have the ``\-follow'' option in
  1036. its \fIfind\fP command.
  1037. This is used in \fIexpire/makeactive.c\fP; you will have to either install
  1038. the GNU \fIfind\fP or edit the source file.
  1039. .NH 1
  1040. Other Source Preparations
  1041. .PP
  1042. In addition to setting up the configuration file, it might be necessary
  1043. to do some other setups.
  1044. .NH 2
  1045. Systems with old syslogs
  1046. .PP
  1047. If you need to install the \fIsyslog\fP that is distributed with INN, go to
  1048. the top of the distribution and type ``make syslogfix''.
  1049. This will also compile \fIsyslogd\fP, the logging daemon.
  1050. You should install this to replace your existing daemon, usually in
  1051. \fI/etc/syslog\fP.
  1052. You will also need to install the new-style \fIsyslog.conf\fP file.
  1053. .PP
  1054. If you cannot replace \fIsyslogd\fP on your machine, then see the file
  1055. \fIsyslog/README\fP for information on how to set it up as an alternate
  1056. daemon.
  1057. .PP
  1058. Ignore any complaints from \fIlint\fP about the INN sources calling
  1059. \fIopenlog\fP with the wrong argument count.
  1060. In fact, if you \fBdon't\fP get any complaints, then something is wrong
  1061. with the way \fIsyslog\fP, \fI<syslog.h>\fP, or the \fIlint\fP libraries
  1062. are set up on your system.
  1063. .NH 2
  1064. The DBZ package
  1065. .PP
  1066. INN uses the DBZ database package.
  1067. Thanks to Jon Zeeff for his permission to use and redistribute DBZ,
  1068. as modified by Henry Spencer. 
  1069. INN has its own set of modifications to DBZ.
  1070. The changes are made with the \fIpatch\fP program and the context diff
  1071. in \fIlib/dbz.pch\fP.
  1072. If you don't have \fIpatch\fP installed, then you can make the changes
  1073. manually.
  1074. (If you don't have Larry Wall's \fIpatch\fP program get it from any
  1075. \fIcomp.sources.unix\fP archive as well as many FSF archives and other
  1076. places \(em you'll be glad you did.)
  1077. .PP
  1078. If you are using \fIvfork\fP (specified in the \fIFORK\fP parameter),
  1079. or you want to \fImmap\fP the database, then you \fBmust\fP apply the patch.
  1080. The Makefile in \fIlib\fP will normally do it for you automatically, anyway.
  1081. The beginning of the patch file describes the changes made in more detail.
  1082. If you do not apply the patch, then you must add add ``dbzalt.c'' and
  1083. \&``dbzalt.o'' to the MISSING_SRC and MISSING_OBJ parameters.
  1084. .PP
  1085. Apparently the System V 386 compiler can't optimize \fIdbz.c\fP (the
  1086. GNU C compiler doesn't have this problem).
  1087. If you have ``\-O'' in your \fIDBZCFLAGS\fP configuration parameter, then
  1088. take it out.
  1089. .NH 2
  1090. Using writev
  1091. .PP
  1092. INN makes extensive use the \fIwritev\fP system call to write several
  1093. I/O buffers in a single call.
  1094. If you do not have \fIwritev\fP then you must copy \fIinclude/uio.h\fP to
  1095. your \fI/usr/include/sys\fP directory.
  1096. You must also add ``writev.c'' and ``writev.o'' to the MISSING_SRC and
  1097. MISSING_OBJ parameters.
  1098. .PP
  1099. The ``fake'' \fIwritev\fP found in the \fIlib\fP directory is not highly
  1100. efficient.
  1101. You might want to write a better one that tries to \fImalloc\fP a new
  1102. buffer and join all the elements.
  1103. Be careful about doing this because \fIinnd\fP can use very big buffers.
  1104. .NH 1
  1105. Compiling the System
  1106. .PP
  1107. Once the INN sources have been configured, they are ready to be compiled.
  1108. If you are very confident of your changes, type the following:
  1109. .DS
  1110. cd $inn
  1111. make all
  1112. .DE
  1113. If you do not get any errors, skip to the section titled ``Installing the
  1114. System.''
  1115. .PP
  1116. If you are confident, but careful, type:
  1117. .DS
  1118. cd $inn
  1119. make world
  1120. cat */lint
  1121. .DE
  1122. This will compile everything, then run \fIlint\fP in all directories.
  1123. .PP
  1124. Another option is to run the \fIBUILD\fP script found at the top of
  1125. the source tree.
  1126. This will interactively configure, compile, and install the system.
  1127. After running that script, skip to the section titled ``Installing the
  1128. System.''
  1129. .PP
  1130. If you are more cautious, you should type the following:
  1131. .DS
  1132. cd $inn/config
  1133. make quiet
  1134. cd ..
  1135. .DE
  1136. This will use your already-tested \fIsubst\fP program with your new
  1137. \fIconfig.data\fP file.
  1138. You should then follow the steps in the following sections.
  1139. .NH 2
  1140. Building the Library
  1141. .PP
  1142. The next step is to build the INN library.
  1143. Do the following
  1144. .DS
  1145. cd $inn/lib
  1146. make libinn.a lint
  1147. .DE
  1148. .PP
  1149. This will build the library and run \fIlint\fP on the sources, putting
  1150. the output into a file named \fIlint\fP.
  1151. If anything fails to compile, you probably made a configuration error,
  1152. most likely in the ``C library differences'' section.
  1153. In particular, double-check the \fISIGHANDLER\fP and \fIxxx_STYLE\fP
  1154. parameters.
  1155. .PP
  1156. The \fIlint\fP output should be almost empty, except for a couple of
  1157. \&``possible pointer alignment problem'' warnings in \fIdbz.c\fP.
  1158. If you get much more than this, then you probably did not define
  1159. the \fIPOINTER\fP or \fISIZE_T\fP parameters properly.
  1160. The \fINEW\fP and \fIRENEW\fP macros in \fIinclude/macros.h\fP try to
  1161. capture all the alignment problems associated with dynamic memory allocation.
  1162. Also double-check the \fIALIGNPTR\fP parameter and the \fICAST\fP macro in
  1163. \fIinclude/macros.h\fP.
  1164. .PP
  1165. If \fIlint\fP reports any other problems, you should take the time to
  1166. investigate them.
  1167. Note that many \fIlint\fP libraries have errors.
  1168. Also, you may get some problems in \fIyaccpar\fP in \fIparsedate.y\fP; these
  1169. are most likely in the \fIyacc\fP-generated C code.
  1170. If you get any of these, complain to your vendor.
  1171. .PP
  1172. If you find a portability issue that I missed, please let me know.
  1173. .PP
  1174. Once the library is built, you should install it in the top-level INN
  1175. directory.
  1176. To do this type ``make\ install'' while still in the \fIlib\fP directory.
  1177. This will also compile a \fIlint\fP library for use in linting the programs
  1178. in the other directories.
  1179. .PP
  1180. Note that any time a change is made to the library you must do
  1181. \&``make\ install''; it is not enough to type ``make\ libinn.a''.
  1182. This is a deliberate decision \(em like a program, compiling a library
  1183. is different from making it available for others to use, and installing
  1184. a library should make it possible to run \fIlint\fP against it.
  1185. .NH 2
  1186. Compiling the Programs
  1187. .PP
  1188. INN's programs are separated into six areas, as detailed in the roadmap.
  1189. You'll need to build each one before you can install and use INN.
  1190. .NH 3
  1191. The Frontend Programs
  1192. .PP
  1193. Frontends are those programs that talk to the main news server, either
  1194. offering it articles or controlling its action.
  1195. This includes the following programs:
  1196. .IP \fIinews\fP 15
  1197. The program that validates and prepares news articles and gives them to
  1198. \fIinnd\fP.
  1199. This is mostly used by users (usually indirectly, through programs like
  1200. \fIPnews\fP), but also through special facilities such as news/mail
  1201. gateways.
  1202. .IP \fIrnews\fP 15
  1203. Unpacks news batches from UUCP sites and offers them to \fIinnd\fP.
  1204. .IP \fIctlinnd\fP 15
  1205. This program controls \fIinnd\fP, directing it to do most of the
  1206. tasks a news administrator will have to do:  create newsgroups,
  1207. update newsfeeds, and the like.
  1208. .PP
  1209. To build these programs, type the following:
  1210. .DS
  1211. cd $inn/frontends
  1212. make all
  1213. .DE
  1214. .NH 3
  1215. Innd
  1216. .PP
  1217. The next program is the main news server, which includes the following
  1218. programs:
  1219. .IP \fIinnd\fP 15
  1220. \fIInnd\fP accepts all incoming NNTP connections and either processes
  1221. their traffic or hands them off to the NNTP ``newsreader'' server.
  1222. It accepts articles, files them, and queues them so that they can be
  1223. sent to downstream feeds.
  1224. \fIInnd\fP listens on the official NNTP port.
  1225. On most systems only root can do this.
  1226. \fIInnd\fP is careful to set the modes of any files it creates, as well as
  1227. the privileges of any processes it spawns.
  1228. .IP \fIinndstart\fP 15
  1229. Sites that are concerned about large root-access programs may wish
  1230. to install \fIinndstart\fP.
  1231. This program opens the port, changes its user and group ID to be that
  1232. of the news administrator, and then \fIexec\fP's \fIinnd\fP with the
  1233. open port.
  1234. It also sets up a secure execution environment.
  1235. It is a small program (about 100 lines) that is easily understood.
  1236. You should use it because \fIinnd\fP will run faster because it won't
  1237. have to make any \fIchown\fP system calls.
  1238. If you make \fIinndstart\fP setuid root then no news maintenance has to
  1239. be done as root.
  1240. .PP
  1241. To build these, type the following:
  1242. .DS
  1243. cd $inn/innd
  1244. make all
  1245. .DE
  1246. .PP
  1247. Note that \fIinnd\fP handles the filing and distribution of certain messages
  1248. differently from other systems.
  1249. For example, you can have newsgroups within ``control'' for the
  1250. different types of control messages.
  1251. See \fIinnd.8\fP, \fInewsfeeds.5\fP, and \fIactive.5\fP in the \fIdoc\fP
  1252. directory for details.
  1253. .NH 3
  1254. The NetNews Reading Daemon
  1255. .PP
  1256. \fIInnd\fP implements a subset of the NNTP protocol \(em only those commands
  1257. that are needed for peer sites to feed news articles.
  1258. You must install \fInnrpd\fP to allow users to read news.
  1259. If a connection comes in from a host that is not a specified feed,
  1260. then an \fInnrpd\fP process is spawned to handle it.
  1261. (You can debug \fInnrpd\fP by running it interactively; put an entry for
  1262. the host named ``stdin'' in your \fInnrp.access\fP file.)
  1263. .PP
  1264. Build the newsreader server by doing the following:
  1265. .DS
  1266. cd $inn/nnrpd
  1267. make all
  1268. .DE
  1269. Note that if users on a peer machine (one that feeds you news) want to
  1270. read news from your server, then you have two choices.
  1271. You can use \fInntpd\fP from the reference platform (See Appendix II)
  1272. and make sure not to list the peer in your \fInntp.access\fP file.
  1273. The other choice is to relink the reading software on the other machine
  1274. with the INN library so that it uses the ``mode reader'' NNTP command
  1275. extension.
  1276. .NH 3
  1277. The Backend Programs
  1278. .PP
  1279. The backend programs take articles that \fIinnd\fP received and offer them
  1280. to your news neighbors.
  1281. This includes the following programs:
  1282. .IP \fIarchive\fP 15
  1283. A simple program to archive news articles.
  1284. .IP \fIbatcher\fP 15
  1285. Collects articles into batches for UUCP delivery.
  1286. .IP \fIbuffchan\fP 15
  1287. A program to split a single \fIinnd\fP stream into separate files.
  1288. It can buffer data, flushing files based on command-line switches.
  1289. .IP \fIcvtbatch\fP 15
  1290. A program to turn a file list into an INN batchfile.
  1291. A transition aide that is only documented in the source.
  1292. .IP \fIfilechan\fP 15
  1293. Another program to split a single \fIinnd\fP stream into separate files.
  1294. It is system-call intensive, but requires no locking protocol.
  1295. .IP \fIinnxmit\fP 15
  1296. A replacement for \fInntpxmit\fP from the reference implementation.
  1297. It reads a file containing a list of articles, and sends them to a host.
  1298. .IP \fInntpget\fP 15
  1299. A program to retrieve articles from a remote site.
  1300. .IP \fIshlock\fP 15
  1301. A program to provide a locking protocol for shell scripts.
  1302. .IP \fIshrinkfile\fP 15
  1303. A program to shrink a file by removing lines from the beginning.
  1304. It is useful for purging backlogged batchfiles.
  1305. .IP \fIsys2nf\fP 15
  1306. A program to turn a B or C News \fIsys\fP file into an INN \fInewsfeeds\fP
  1307. file.
  1308. This is a transition aide that is only documented in the source.
  1309. .PP
  1310. To build this set of programs, type the following:
  1311. .DS
  1312. cd $inn/backends
  1313. make all
  1314. .DE
  1315. .NH 3
  1316. Expire
  1317. .PP
  1318. This directory includes programs to modify the history database
  1319. as well as some utilities that might be useful in this task.
  1320. The database is called the \fIhistory\fP file, and it contains one
  1321. line for every article on the system, specifying when it was received
  1322. and where it was filed.
  1323. This file is indexed by the Message-ID, and the DBZ package provides fast
  1324. retrieval from it.
  1325. .IP \fIconvdate\fP 15
  1326. Converts between user-readable dates and the format used in the history file.
  1327. .IP \fIexpire\fP 15
  1328. Scans the history database to purge old entries, and remove old articles
  1329. from the spool area.
  1330. You can specify how long to keep sets of newsgroups.
  1331. .IP \fImakeactive\fP 15
  1332. This program can be used to rebuild the \fIactive\fP file if it is
  1333. lost in a crash.
  1334. .IP \fImakehistory\fP 15
  1335. This program scans through the spool area and rebuilds the history files.
  1336. .IP \fInewsrequeue\fP 15
  1337. This program can be used after a crash to resend articles to your neighbors.
  1338. .IP \fIprunehistory\fP 15
  1339. This is a tool for other programs that expire news.
  1340. It reads a list of Message-ID's and filenames, and updates the history
  1341. file to mark that the files have been deleted.
  1342. .PP
  1343. This directory also includes \fIexpire.pch\fP and \fIreap.pch\fP.
  1344. The first is a patch to the C News expire program that lets it cooperate
  1345. better with \fIinnd\fP, sending it messages when articles have been removed.
  1346. The second is a set of patches to the \fIreap\fP program that lets it
  1347. cooperate with \fIprunehistory\fP; it also adds some other useful features.
  1348. Both patch files have additional information in them.
  1349. Both programs are unsupported, provided by members of the beta-test group.
  1350. .PP
  1351. To build these programs, type the following:
  1352. .DS
  1353. cd $inn/expire
  1354. make all
  1355. .DE
  1356. .PP
  1357. If you are currently running C News, note that it has a directory named
  1358. \fIexpire\fP that is often the same pathname as INN's \fIexpire\fP program.
  1359. You will have to move, or remove, the directory before you can intall
  1360. the INN program.
  1361. .NH 3
  1362. Script and data files
  1363. .PP
  1364. In addition to the programs, INN requires several scripts.
  1365. For example, one script starts the server when the machine boots
  1366. while another prunes the log files and runs \fIexpire\fP every night.
  1367. Many of these scripts can be used as-is until you get a feel for
  1368. how INN works.
  1369. .PP
  1370. INN also requires several data files.
  1371. One specifies what sites feed you news, another what sites you feed, and
  1372. so on.
  1373. INN cannot provide these, other than giving sample entries.
  1374. You'll probably find that writing these files will be the hardest part of
  1375. your installation.
  1376. .PP
  1377. Prototypes for all these files are provided in the \fIsamples\fP directory.
  1378. Your modified copies should be maintained in the \fIsite\fP directory.
  1379. By splitting things up this way, official updates will never wipe out
  1380. any changes you have made.
  1381. .PP
  1382. To create the initial set of files, do the following:
  1383. .DS
  1384. cd $inn/site
  1385. make all
  1386. .DE
  1387. .PP
  1388. See below for an explanation of each file.
  1389. .NH 2
  1390. Manual pages
  1391. .PP
  1392. INN comes with an extensive set of manual pages.
  1393. You might want to edit the Makefile to set up the right ownership of
  1394. the installed manual pages.
  1395. Or you might want to not bother installing them at all.
  1396. .PP
  1397. When it comes to reading them, you should start with \fIinnd.8\fP
  1398. and \fIctlinnd.8\fP.
  1399. From there follow the cross-references as you want.
  1400. .NH 1
  1401. Installing the System
  1402. .PP
  1403. Although either \fIinnd\fP or \fIinndstart\fP must be run by root, most
  1404. of the installation does not have to be done as root.
  1405. The \fI$inn/makedirs.sh\fP script creates all the necessary directories used
  1406. by INN, and sets up the right ownerships and modes: owned by \fINEWSUSER\fP
  1407. in group \fINEWSGROUP\fP with 0775 permissions (the ``firewall'' directory,
  1408. \fI_PATH_INDDDIR\fP, has mode 0770).
  1409. You should review this script, then run it.
  1410. .PP
  1411. The rest of the installation should be done as the news administrator
  1412. or as root.
  1413. The Makefiles are very strict about setting the modes on the files that
  1414. get installed.
  1415. To install the programs, do the following:
  1416. .DS
  1417. cd $inn
  1418. make update
  1419. .DE
  1420. This target does a ``make\ install'' in all program directories.
  1421. It installs the programs and manpages, but does not update or install
  1422. any configuration files or scripts.
  1423. This is important:  in any directory (including the top-level one), a
  1424. \&``make\ install'' will install everything in that directory into
  1425. the right place.
  1426. A ``make\ update'' can only be done in the top-level directory or in the
  1427. \fIsite\fP directory, and it only replaces scripts, not configuration files.
  1428. When updating to a new INN release, you will probably want to do an ``update''
  1429. first, and then review the changed files by doing ``make\ diff'' in the
  1430. \fIsite\fP directory, and integrate your local changes as appropriate.
  1431. The Makefile also has other targets that you might find useful, so the
  1432. comments for entries like ``most'' and ``installed-diff', for example.
  1433. .PP
  1434. The next, and last, step is to build your INN configuration files and utility
  1435. scripts.
  1436. If you have not already done so, type the following:
  1437. .DS
  1438. cd $inn/site
  1439. make all
  1440. .DE
  1441. This will get copies of the scripts and files from the \fIbackends\fP and the
  1442. \fIsamples\fP directories and run \fIsubst\fP over them.
  1443. Whenever patches are issued, doing a \fImake\fP in this directory will let
  1444. you know what files have been updated, without destroying your local changes.
  1445. The \fIgetsafe.sh\fP script does this.
  1446. If you have either an \fISCCS\fP or an \fIRCS\fP directory then
  1447. \fIgetsafe.sh\fP will use the appropriate source control system for the
  1448. files in this directory.
  1449. .PP
  1450. The first set of files are used to carry out the control messages.
  1451. You might want to look them over; in particular, look at the table in
  1452. \fIcontrol.ctl\fP and the newslog manpages in \fIdoc\fP.
  1453. The control files are:
  1454. .DS
  1455. .ta 1.5i
  1456. checkgroups    rmgroup
  1457. control.ctl    sendme
  1458. default    sendsys
  1459. docheckgroups    senduuname
  1460. ihave    version
  1461. newgroup    writelog
  1462. parsecontrol
  1463. .DE
  1464. .PP
  1465. The following scripts are normally invoked by \fIcron\fP or at
  1466. system boot time, and should not require many changes:
  1467. .DS
  1468. .ta 1.5i
  1469. innlog.awk    scanlogs
  1470. innstat    tally.control
  1471. news.daily    tally.unwanted
  1472. rc.news
  1473. .DE
  1474. \fIRc.news\fP starts the server.
  1475. \fINews.daily\fP invokes \fIexpire\fP and \fIscanlogs\fP.
  1476. \fIScanlogs\fP calls the other scripts to process the logs.
  1477. You might want to review these scripts just to see what they do.
  1478. Do not get bogged down in the details, just read the comments.
  1479. They are documented in the manpages news.daily(8) newslog(5), and newslog(8).
  1480. .PP
  1481. There are some utility scripts to send news to your news feeds:
  1482. .DS
  1483. .ta 1.5i
  1484. nntpsend    send-nntp
  1485. nntpsend.ctl    send-uucp
  1486. send-ihave    sendbatch
  1487. .DE
  1488. They flush and lock the batch file for the specified site(s) and then call
  1489. \fIinnxmit\fP to send the articles to your downstream feeds.
  1490. \fISend-ihave\fP is used for ``ihave/sendme'' feeds and is described
  1491. in an appendix.
  1492. \fISendbatch\fP and \fIsend-uucp\fP flush and lock batchfiles and call
  1493. \fIbatcher\fP to queue up UUCP jobs.
  1494. You might want to modify these files to change the flags given to \fIuux\fP;
  1495. the default is to queue jobs up as grade ``d.''
  1496. You will almost definitely have to edit them to make sure that they properly
  1497. parse the output of \fIdf\fP so that your spool area is not overrun!
  1498. \fINntpsend\fP and \fIsend-nntp\fP do the same thing for NNTP feeds.
  1499. You must determine how you want to propagate your articles \(em the scripts
  1500. give common ways of getting the job done.
  1501. .PP
  1502. The following files will have to be edited to contain your local information.
  1503. They all have manual pages in the \fIdoc\fP directory that describe them:
  1504. .DS
  1505. .ta 1.5i
  1506. expire.ctl    newsfeeds
  1507. hosts.nntp    nnrp.access
  1508. inn.conf    passwd.nntp
  1509. moderators
  1510. .DE
  1511. .PP
  1512. The last group of files are utility scripts you might find useful:
  1513. .DS
  1514. .ta 1.5i
  1515. ctlrun    makegroup
  1516. inncheck    scanspool
  1517. innwatch
  1518. .DE
  1519. \fICtlrun\fP reads all the articles filed in your ``control'' newsgroup
  1520. and calls the appropriate control message script to parse them.
  1521. \fIInncheck\fP is a Perl script to check the syntax and permissions of
  1522. an installed INN system.
  1523. \fIInnreport\fP is an alternate way of summarizing the server's log file.
  1524. It is a Perl script.
  1525. \fIInnwatch\fP is a shell script to monitor the system and stop the server
  1526. when you are running low on disk space or inodes; it could be run out of your
  1527. \fI_PATH_NEWSBOOT\fP script.
  1528. You might have to edit it to understand your \fIdf\fP output format.
  1529. \fIMakegroup\fP is a front-end to \fIrnews\fP that helps you write
  1530. a control message to create a newsgroup.
  1531. You should review this script because you might have to change the way the
  1532. output of the \fIdate\fP command is parsed, and because you might might
  1533. want to change the default distribution.
  1534. \fIScanspool\fP is a Perl script to make sure that the active file
  1535. and the contents of your spool tree agree.
  1536. .PP
  1537. Once you have made the necessary modifications (and I admit that some of
  1538. this \(em especially the \fInewsfeeds\fP file \(em will be difficult), you
  1539. should type the following:
  1540. .DS
  1541. make install
  1542. .DE
  1543. Make sure you have \fIrc.news\fP installed in the right place, as explained
  1544. in the ``Paths to common programs'' section, above.
  1545. You might find it useful to read the ``First-Time Usenet or NNTP Installation''
  1546. appendix for help on navigating through the INN configuration files.
  1547. .PP
  1548. There are now only a couple more things to check.
  1549. First, make sure you have an \fIactive\fP file and a \fIhistory\fP database!
  1550. The appendices explain how to convert your existing files; the \fIBUILD\fP
  1551. script will create new ones for you.
  1552. If you have Perl, run \fIinncheck\fP to make sure that you have the
  1553. datafiles configured correctly.
  1554. The second is make sure that you have correctly updated your \fIsyslog.conf\fP
  1555. file to match the filenames and logging levels required by INN.
  1556. See \fIsyslog/syslog.conf\fP for an example of what to do.
  1557. .PP
  1558. Once you have done all of this, InterNetNews is now installed, and ready
  1559. to run \(em have fun!
  1560. .NH 1
  1561. Heterogeneous Client Installations
  1562. .PP
  1563. The \fIinews\fP program is used by user newsreaders.
  1564. Programs such as \fIrn\fP (which call \fIPnews\fP) prepare a news article
  1565. and feed it into \fIinews\fP.
  1566. \fIInews\fP validates the news headers, adds its own, and feeds the article
  1567. to the campus \fIinnd\fP server.
  1568. The \fIinews\fP that comes with INN is more useful then the ``mini-inews''
  1569. that comes with the reference implementation.
  1570. You cannot run the standard B2.11 \fIinews\fP.
  1571. You can run the C News \fIinews\fP, but only on client machines (i.e.,
  1572. those with a \fI$NEWSCTL/server\fP file).
  1573. I recommend that you install INN's \fIinews\fP on all the clients in your
  1574. campus.
  1575. .PP
  1576. INN comes with a \fIMakeInews\fP script to make it easier to build and
  1577. install \fIinews\fP on a wide variety of hosts.
  1578. This script creates a directory and copies all the necessary files (headers,
  1579. sources, configuration files) into it.
  1580. The script takes an optional argument, which should name the client machine's
  1581. architecture.
  1582. For example:
  1583. .DS
  1584. cd $inn
  1585. \&./MakeInews sun3
  1586. .DE
  1587. will create an \fIinews.sun3\fP directory.
  1588. You can then examine the Makefile in that directory, and build and install
  1589. \fIinews\fP on your Sun-3 clients.
  1590. This is easiest if the client NFS-mounts the source directory \(em that
  1591. way you can keep all your \fIinews\fP sources in one place.
  1592. .PP
  1593. \fIRnews\fP only has to be available on the machine where you run UUCP
  1594. (and perhaps a mail-news gateway).
  1595. If this is not the same machine as where \fIinnd\fP is running, then the
  1596. \fIMakeRnews\fP script can be used in the same manner as the \fIMakeInews\fP
  1597. script.
  1598. .\" $Revision: 1.10 $
  1599. .NH 1
  1600. Known Problems
  1601. .PP
  1602. If you use NIS (formerly Yellow Pages) on SunOS, you will need to add
  1603. a ``domainname'' entry to your \fIinn.conf\fP file if your hosts do
  1604. not contain fully-qualified domain names.
  1605. The most common symptom of this is that \fIinews\fP will fail because
  1606. it cannot generate a Message-ID.
  1607. Another problem with NIS is that reverse name lookups do not return the
  1608. fully-qualified domain name.
  1609. If you know that none of your local clients have a period in their name,
  1610. you can use a pattern like ``*[^.]*'' in your \fInnrp.access\fP file.
  1611. .PP
  1612. SunOS4.1.1 has a bug where \fIwrite\fP(2) can return EINTR.
  1613. The most common symptom is the following fatal error message from \fIinnd\fP:
  1614. .DS
  1615. Can't sync history, interrupted system call
  1616. .DE
  1617. This is Sun bug 1052649.
  1618. It is fixed in patch 100293-01.
  1619. According to the release manual, it is also fixed in all releases of SunOS
  1620. since 4.1.2.
  1621. .PP
  1622. If you have \fINOFILE_LIMIT\fP set you should know that the standard I/O
  1623. library in SunOS4.x has trouble with more than 127 descriptors.
  1624. The most common symptom is the following fatal error message from \fIinnd\fP:
  1625. .DS
  1626. can't fopen /usr/local/news/history, invalid argument
  1627. .DE
  1628. This occurs after doing a \fIctlinnd\fP ``reload'' command.
  1629. For a work-around, reboot your server instead of trying to ``reload.''
  1630. Another symptom is that \fIinnd\fP will exit if you do a \fIctlinnd\fP
  1631. \&``flush'' command while the server is paused or throttled.
  1632. This is Sun bug 1045141.
  1633. Sun does not plan to fix it for any 4.x release.
  1634. .PP
  1635. One site has reported the same error message happens after doing
  1636. a sequence of ``throttle'' and ``go'' commands.
  1637. It does not appear to be related to the bug mentioned above, although
  1638. the symptom is the same.
  1639. If you replace the body of INN's \fIxfopena\fP routine with the following,
  1640. it will work:
  1641. .DS
  1642. return fopen(p, "a+");
  1643. .DE
  1644. This is in the file \fIlib/xfopena.c\fP.
  1645. .PP
  1646. If you use Sun's unbundled compiler, \fIacc\fP, you must make sure
  1647. to use the unbundled assembler, too.
  1648. You might also get lots of ``left operand must be modifiable lvalue'' errors.
  1649. Setting \fIUSE_CHAR_CONST\fP to ``DONT'' will help.
  1650. .PP
  1651. There have been reports that the VAX Ultrix 4.2 \fImalloc\fP doesn't work
  1652. well with \fIinnd\fP, causing it to slowly fill up all swap space.
  1653. I believe that all of the memory leaks in \fIinnd\fP have been fixed,
  1654. but you might want to look at using a different \fImalloc\fP package.
  1655. The Kingsley/Perl \fImalloc\fP package is provided in the \fIlib\fP directory.
  1656. Add ``malloc.c'' and ``malloc.o'' to the MISSING_SRC and MISSING_OBJ lines
  1657. in \fIconfig.data\fP and rebuild.
  1658. .PP
  1659. I have been told that on SunSoft Interactive
  1660. UNIX System V Release 3.2 Version 3.0 systems <errno.h> has been
  1661. broken up into separate files.
  1662. The easiest way to work around this problem is to add
  1663. \&``#include\ <net/errno.h>'' to \fIinclude/clibrary.h\fP.
  1664. .PP
  1665. If you use 386BSD (the Jolitz port, not the BSDI product) you will have to
  1666. set \fIACT_STYLE\fP to ``READ''.
  1667. If you do not do this then the active file will not get updated.
  1668. Another work-around is to insert an ``msync'' call in the ICDwriteactive
  1669. routine in \fIinnd/icd.c\fP.
  1670. This is not supported because I consider the 386BSD behavior to be buggy.
  1671. .PP
  1672. The default configuration of some Sequent kernels does not provide enough
  1673. descriptors for \fIinnd\fP to run.
  1674. You might have to rebuild your kernel with the ``MAXNOFILE=128''
  1675. and ``NOFILEEXT=64'' options.
  1676. You will also have to had a ``setdtablesize(nnn)'' call in the main routine
  1677. of \fIinnd\fP, and a ``setdtablesize(0)'' call in the Spawn routine.
  1678. .PP
  1679. I have been told that some older versions of the SCO \fIopendir\fP routine
  1680. have file descriptor leaks.
  1681. The most noticeable symptom is probably that \fIinnd\fP will die while
  1682. trying to renumber the \fIactive\fP file.
  1683. You might want to use a freely-redistributable ``dirent'' package such
  1684. as one distributed by the Free Software Foundation.
  1685. .PP
  1686. On some SVR4 systems, attempting to set the socket buffer size is either
  1687. not supported or, even worse, might result in \fIinnd\fP's data size
  1688. growing.
  1689. The most noticeable symptom is ``cant setsockopt(SNDBUF)'' messages in
  1690. your \fIsyslog\fP output.
  1691. To fix this, either comment out the calls to \fIsetsockopt\fP in
  1692. \fIinnd/nc.c\fP or add ``\-USO_SNDBUF'' to your \fIDEFS\fP config
  1693. parameter.
  1694. .PP
  1695. I have heard that Sony SVR4 systems have lots of problems.
  1696. You must set \fIHAVE_UNIX_DOMAIN\fP to ``DONT''; sockets in general seem
  1697. to have problems, including kernel crashes and a blocked \fIinnd\fP.
  1698. .PP
  1699. If you use the GNU \fIsed\fP in the \fI_PATH_SED\fP configuration parameter,
  1700. make sure you get version 1.13; earlier versions have a bug that breaks
  1701. the \fIparsecontrol\fP scripts.
  1702. The most noticeable symptom is that all ``newgroup'' control messages
  1703. result in mail saying that they are unparseable.
  1704. .PP
  1705. Some versions of the shell in HP-UX do not properly parse a quoted ``[''
  1706. when it is in a pattern for a \fIcase\fP statement.
  1707. The most noticeable symptom is that \fInews.daily\fP does not properly
  1708. expire articles if \fIinnwatch\fP has throttled the server.
  1709. Contact HP and get a fix for SR # 5003-009811.
  1710. .PP
  1711. On some versions of AIX on the RS/6000, using memory-mapping can eat
  1712. up all the page space or crash the machine.
  1713. This will be noticeable if you have \fIACT_STYLE\fP set to ``MMAP'' and/or
  1714. have ``-DMMAP'' in \fIDBZCFLAGS\fP.
  1715. Ask your IBM representative for the ``U413090'' PTF and prerequisites to
  1716. apply it; it is believed that this will fix it.
  1717. .bp
  1718. .SH
  1719. Appendix I:  Differences from other News software
  1720. .PP
  1721. Administrators will find that INN is fairly incompatible with B and C News.
  1722. This section tries to mention the most important places where INN differs
  1723. from the other news systems.
  1724. If you have not maintained B or C News, you should probably skip this
  1725. section.
  1726. .PP
  1727. Users will generally only notice is that INN is faster; it should be
  1728. 100% compatible with the other systems at the user level.
  1729. If you had particular problems that aren't mentioned here, please let me know.
  1730. Note, however, that this is \fInot\fP a tutorial on how to set up a new
  1731. INN system, or convert older software to it; no such document exists.
  1732. .NH 0
  1733. Configuration Files
  1734. .PP
  1735. Below is a list of the data files used by B and C News, and the reference
  1736. NNTP implementation, along with a short summary of how they map into INN
  1737. configuration files.
  1738. The syntax is always different: INN files are almost always a set of
  1739. colon-separated fields where lines beginning with a poundsign are ignored.
  1740. .IP \fIexplist\fP 15
  1741. This is replaced by the similar \fIexpire.ctl\fP file.
  1742. Archiving is done by a separate program.
  1743. .IP \fImailpaths\fP 15
  1744. This is replaced by the \fImoderators\fP file.
  1745. The ``default'' entry in \fImailpaths\fP is replaced by either a
  1746. full wildcard (``*'') entry in the \fImoderators\fP file, or by a
  1747. \&``moderatormailer'' entry in the \fIinn.conf\fP file.
  1748. .IP \fInntp.access\fP 15
  1749. This is replaced by the \fIhosts.nntp\fP (for NNTP peers) and
  1750. \fInnrp.access\fP (for newsreading) files.
  1751. .IP \fInntp.sys\fP 15
  1752. This is a password file used if NNTP is compiled with the ``AUTH'' option.
  1753. It is replaced by the \fIpasswd.nntp\fP file.
  1754. Note that \fIinews\fP and \fIrnews\fP will also try to read \fIpasswd.nntp\fP.
  1755. Therefore, you will probably want to have one-line versions of it for your
  1756. on-campus clients.
  1757. .IP \fIorganization\fP 15
  1758. This is replaced by the ``organization'' entry in the \fIinn.conf\fP file.
  1759. .IP \fIrn/server\fP 15
  1760. This is replaced by the ``server'' entry in the \fIinn.conf\fP file.
  1761. .IP \fIwhoami\fP 15
  1762. This is replaced by the ``pathhost'' and ``fromhost'' entries in the
  1763. \fIinn.conf\fP file.
  1764. .NH 1
  1765. Newsgroups, Active, Sys, and Newsfeeds
  1766. .PP
  1767. The biggest difference is how the \fInewsfeeds\fP file compares with the
  1768. \fIsys\fP file.
  1769. Newsgroup patterns like ``all.all.ctl'' are completely gone.
  1770. All newsgroup patterns are shell-style wildcards, matched against the
  1771. \fIactive\fP file.
  1772. .PP
  1773. The \fIactive\fP file is taken to be the definitive list of newsgroups that you
  1774. want to receive.
  1775. With B and C news, an article must match the subscription list of the
  1776. local site as specified in the \fIsys\fP file.
  1777. If it matches, each newsgroup is then looked up in the \fIactive\fP file.
  1778. If none of the newsgroups are found, then the article is filed into the
  1779. newsgroup named ``junk''.
  1780. .PP
  1781. INN's behavior is much simpler.
  1782. If a newsgroup does not appear in the \fIactive\fP file, it is ignored.
  1783. If none of the groups are mentioned, then the article is rejected:
  1784. nothing is written to disk.
  1785. This is a deliberate design decision:  if you do not want a particular
  1786. newsgroup to take up your disk space, remove it from the \fIactive\fP file;
  1787. if your neighbors have not gotten around to updating your newsfeed, then
  1788. the only thing that will happen is that some network bandwidth will have
  1789. been wasted when they send you the article.
  1790. .PP
  1791. You can change INN's behavior so that it resembles the other systems.
  1792. To do this, compile with \fIWANT_JUNK\fP set to ``DO.''
  1793. Note that this will accept \fIeverything\fP.
  1794. Because there is no subscription list, you cannot say ``give me all of the
  1795. foo hierarchy (filed into junk), but not the alt hierarchy.''
  1796. You must list the group in the \fIactive\fP file.
  1797. .PP
  1798. INN strictly believes in distributions.
  1799. If the site named \fIME\fP has any distributions, then incoming articles
  1800. must either have no Distribution header, or the header must match the
  1801. distribution list.
  1802. If you want to blindly accept all distributions, make sure you do not
  1803. have a ``/distrib,...'' section in your \fIME\fP entry.
  1804. Distributions are fixed strings \(em there are no patterns or special
  1805. wildcards like ``all.''
  1806. .PP
  1807. For more details on these items, see \fIdoc/newsfeeds.5\fP.
  1808. .NH 1
  1809. Control Messages
  1810. .PP
  1811. Like C News, INN implements all control messages other than cancel as
  1812. shell scripts.
  1813. The number and type of parameters is different from that of C News.
  1814. All control messages consult the file \fIcontrol.ctl\fP before acting on
  1815. the message.  If the sender's address matches with the list of authorized
  1816. addresses (e.g., ``tale@uunet.uu.net'', ``*'', etc.), the control
  1817. message is either acted upon, mailed to the news administrator, or logged.
  1818. For example, messages from ``tale@uunet.uu.net'' (the current moderator
  1819. of news.announce.newgroups) are honored.
  1820. .PP
  1821. The ``control'', ``junk'', and ``to'' newsgroups can be explicitly sent
  1822. or not sent.
  1823. See \fIdoc/newsfeeds.5\fP and \fIdoc/innd.8\fP.
  1824. .PP
  1825. The \fIctlinnd\fP program is what really directs the server to create or
  1826. remove newsgroups.
  1827. This results in a semi-recursive process:  the control message arrives, and
  1828. a script is invoked to process the message.
  1829. If approved, the script invokes \fIctlinnd\fP to send a message back to the
  1830. server telling it to create or remove the group.
  1831. .NH 1
  1832. Locking
  1833. .PP
  1834. A running news system has many open files.
  1835. These files can be divided into two groups.
  1836. The first group includes the history database and \fIactive\fP file.
  1837. The second group includes the logfiles and batch files used to send articles
  1838. to your feeds.
  1839. .PP
  1840. B news uses an internal protocol for the first group.
  1841. For the second group, since \fIinews\fP does ``atomic appends,''
  1842. no locking is necessary.
  1843. C news uses the \fIlocknews\fP and \fInewslock\fP scripts for the first
  1844. group, and provides no fine-grain mechanism for the second group.
  1845. .PP
  1846. With INN, the server is running all the time and all locking is done under
  1847. the direction of \fIctlinnd\fP.
  1848. The first group is generally handled by using the ``throttle,'' ``pause,''
  1849. and ``go'' commands (sometimes ``reload'' will be necessary).
  1850. The second group is handled by the ``flushlogs'' and ``flush'' commands.
  1851. See the \fIdoc/ctlinnd.8\fP manpage; examples of their use can be found in
  1852. various scripts in the \fIsamples\fP directory.
  1853. .\"
  1854. .bp
  1855. .SH
  1856. Appendix II:  Converting from other News software
  1857. .PP
  1858. INN is a complete news transport and expiration system.
  1859. Since few people will be installing INN from scratch, this section
  1860. should help you determine what you can ``throw out'' from your earlier
  1861. news setups.
  1862. It is also compatible with much of the existing news software, so you
  1863. can create a mixed environment if you want to, and if you are careful.
  1864. .NH 0
  1865. C News Expire
  1866. .PP
  1867. The \fIexpire\fP program that is distributed with INN does not do
  1868. any archiving.
  1869. Since the history databases currently have the same format, it is possible to
  1870. use the C News \fIexpire\fP if you want to.
  1871. (The INN history database may change, however, so you should only do this
  1872. if you really have to \(em you really should use INN's \fIexpire\fP.)
  1873. There are three ways to do this.
  1874. .PP
  1875. The first way is to change your \fIdoexpire\fP script so that it calls
  1876. \fIctlinnd\fP to ``throttle'' \fIinnd\fP just before \fIexpire\fP
  1877. runs.
  1878. It should then issue a \fIctlinnd\fP ``go'' command after \fIexpire\fP
  1879. is done.
  1880. The drawback to this method is that no incoming news is accepted until
  1881. all expiration is finished.
  1882. .PP
  1883. The second way is to compile \fIlib/lock.c\fP and add it to your C News
  1884. library \fIlibcnews.a\fP, replacing the provided lock functions.
  1885. You should then remove \fIexpire\fP and relink it.
  1886. This method has not been tested very thoroughly, but it is rather simple.
  1887. .PP
  1888. The third way is to teach the C News \fIexpire\fP to talk to \fIinnd\fP
  1889. and tell it to cancel articles that it would remove.
  1890. To do this, apply the patch file \fIexpire/expire.pch\fP to your C News
  1891. \fIexpire.c\fP sources.
  1892. You will also have to add \fIlib/inndcomm.o\fP to \fIlibcnews.a\fP and
  1893. then rebuild \fIexpire\fP.
  1894. .NH 1
  1895. Standard NNTP daemon
  1896. .PP
  1897. You can use the ``standard'' \fInntpd\fP server.
  1898. You should only have to do this if you have hosts that feed you news,
  1899. and where the users on that machine also want to read news on your
  1900. machine.
  1901. .PP
  1902. Make sure that you configure \fInntpd\fP so that it is using DBZ, and have
  1903. it feed each individual article to \fIinews\fP; don't use the \&``batched
  1904. input'' option.
  1905. It should also be set up so that it acts as if it is running under
  1906. \fIinetd\fP.
  1907. You should also make sure that \fIinetd\fP does nothing with the NNTP
  1908. port, number 119.
  1909. .NH 1
  1910. NNTP-based newsreaders
  1911. .PP
  1912. If you already have your NNTP-using newsreaders installed and running,
  1913. you do not have to do anything.
  1914. This includes \fIxvnews\fP, \fIxrn\fP, \fIrrn\fP and so on.
  1915. INN implements the standard NNTP protocol, with some extensions.
  1916. INN does not provide the extensions used by \fItrn\fP, \fItin\fP or
  1917. other newsreaders.
  1918. (You can enable the \fItrn\fP ``XTHREADS'' by modifing \fInnrpd/nnrpd.h\fP;
  1919. change the ``DONT_DO_XTHREAD'' to ``DO_DO_XTHREAD'' and verify the other
  1920. macros in that section.
  1921. INN will not implement all the different indexing systems because the
  1922. right solution is to have a generic interface that all readers can use.)
  1923. .PP
  1924. For administrative convenience, however, you might wish to have all your
  1925. newsreaders use the INN library and configuration files to talk to the server.
  1926. The next section describes how to do that for \fIrn\fP.
  1927. It is provided as an example, to help you convert other programs you
  1928. might have.
  1929. INN does not provide, nor fully support, any newsreaders.
  1930. .NH 1
  1931. Remote rn
  1932. .PP
  1933. The ``remote'' version of \fIrn\fP (also called \fIrrn\fP) uses a set of
  1934. routines in the NNTP ``clientlib'' file.
  1935. INN can emulate these routines; see \fIdoc/clientlib.3\fP.
  1936. If you need to build \fIrn\fP for client machines that don't have the
  1937. entire INN distribution available, use the \fIMakeLib\fP script to
  1938. build a distribution directory of the necessary routines.
  1939. Use this script the same way you use the \fIMakeInews\fP script.
  1940. .PP
  1941. \fIRn\fP, \fIrrn\fP, and \fItrn\fP are moving targets so these instructions
  1942. may be out of date.
  1943. The maintainers have agreed to officially support INN, however, which is
  1944. a good thing.
  1945. .PP
  1946. There are two ways to build \fIrn\fP so that it uses the INN library.
  1947. If you don't have the NNTP distribution installed you will have to use
  1948. the first way.
  1949. .PP
  1950. The first way is to apply a patch to the latest \fIrn\fP \fIConfigure\fP
  1951. script and then execute it and rebuild the program.
  1952. To do this, type the following:
  1953. .DS
  1954. cd \fIrn_source\fP
  1955. patch <$inn/frontends/rn.pch
  1956. \&./Configure
  1957. make
  1958. .DE
  1959. At some point, \fIConfigure\fP will ask you if you want to use the
  1960. InterNetNews library; answer \fIyes\fP.
  1961. You can then use either the full sources, or a special library that
  1962. contains just the needed header and sources files.
  1963. Tell \fIConfigure\fP the appropriate pathnames, and then proceed
  1964. with the rest of the \fIrn\fP installation.
  1965. .PP
  1966. The second way is to edit a couple of files after you have run \fIConfigure\fP
  1967. and set it up to build the remote rn.
  1968. First, replace the \fIrn\fP file \fIserver.h\fP with the INN file
  1969. \fIinclude/myserver.h\fP.
  1970. The next step is to edit the \fIrn\fP Makefile to remove the ``clientlib''
  1971. file from the source and object file lists.
  1972. This can probably be done by commenting out the definitions of the
  1973. \fIc5\fP and \fIobj5\fP variables.
  1974. You must also edit the Makefile to add the INN library to the list of
  1975. libraries that are linked in.
  1976. This can probably be done by editing the line that defines the \fIlibs\fP
  1977. variable so that the full pathname to \fIlibinn.a\fP is the first item
  1978. after the equal sign.
  1979. .NH 1
  1980. Removing the Other Stuff
  1981. .PP
  1982. The names below assume a ``standard'' news setup; things might be different
  1983. on your machine.
  1984. Also, many programs have alternate names and links; make sure you chase down
  1985. and remove \fBall\fP of them.
  1986. .PP
  1987. You might find it easiest to rename your \fI/usr/lib/news\fP (and
  1988. \fI/usr/lib/newsbin\fP) directories to something else and start with a
  1989. clean slate, copying over the files as they are needed.
  1990. Make \fBsure\fP that your news processing is completely stopped before
  1991. you begin this process.
  1992. That includes any \fIcron\fP jobs that may be running.
  1993. .PP
  1994. The \fI/usr/lib/news\fP directory can become cluttered \(em that's why
  1995. C News split everything up into separate directories.
  1996. The following files are compatible with C News and B2.11 News, and should be
  1997. \fIkept\fP:
  1998. .DS
  1999. .ta 1.5i
  2000. active    active.times
  2001. .DE
  2002. If you are running C News keep these files, otherwise delete them and use
  2003. \fImakehistory\fP to rebuild them:
  2004. .DS
  2005. history
  2006. history.dir
  2007. history.pag
  2008. .DE
  2009. .PP
  2010. \fIRn\fP does not have to be modified so leave this directory alone (or
  2011. copy it back if you moved your original):
  2012. .DS
  2013. /usr/local/lib/rn
  2014. .DE
  2015. If you set up \fIrn\fP to use the INN library, remove this file:
  2016. .DS
  2017. /usr/local/lib/rn/server
  2018. .DE
  2019. .PP
  2020. The input system is completely replaced.
  2021. Remove the following programs and their manpages:
  2022. .DS
  2023. /bin/cunbatch
  2024. /bin/inews, /usr/lib/news/inews, etc...
  2025. /bin/rnews, /usr/bin/rnews, etc...
  2026. /usr/lib/news/rnews.stall
  2027. /etc/nntpd, /usr/etc/nntpd, etc...
  2028. .DE
  2029. Also remove the following directories and everything within them:
  2030. .DS
  2031. /usr/lib/news/bin/input
  2032. /usr/lib/news/bin/relay
  2033. /usr/lib/news/bin/ctl
  2034. /usr/lib/news/bin/inject
  2035. /usr/lib/news/nntp (mkgrdates, nntp_access, shlock, etc)
  2036. .DE
  2037. .PP
  2038. The transmission facility is completely replaced.
  2039. You may keep your current feed subsystem if you want to, but it will require
  2040. some changes to make sure that batchfiles are properly flushed; see the
  2041. \fIsend-xxx\fP scripts for examples.
  2042. Remove these files and programs:
  2043. .DS
  2044. /usr/lib/news/batchparms
  2045. /usr/man/man8/newsbatch.8
  2046. .DE
  2047. Remove the following directory and everything within it:
  2048. .DS
  2049. /usr/lib/news/bin/batch
  2050. .DE
  2051. You can continue to use \fInntplink\fP, \fInewsxd\fP, and the like, subject
  2052. to the caveat just mentioned.
  2053. .PP
  2054. Article expiration and maintenance of the history and active files is
  2055. completely replaced.
  2056. Remove this file:
  2057. .DS
  2058. /usr/lib/news/explist
  2059. .DE
  2060. Remove the following directories and everything within them:
  2061. .DS
  2062. /usr/lib/news/bin/expire
  2063. /usr/lib/news/bin/maint
  2064. .DE
  2065. If you do not remove the \fIexpire\fP directory, you will probably have
  2066. problems installing INN's \fIexpire\fP, which is a program that often
  2067. has the same name as the C News directory.
  2068. .PP
  2069. The following programs in \fI/usr/lib/newsbin\fP are not needed and can be
  2070. deleted.
  2071. Keeping them around is harmless, and if you find them useful don't delete
  2072. them:
  2073. .DS
  2074. .ta 1.5i
  2075. canonhdr    newshostname
  2076. ctime    newslock
  2077. dbz    queuelen
  2078. getabsdate    sizeof
  2079. getdate    spacefor
  2080. gngp
  2081. .DE
  2082. Note that \fIctime\fP, \fIgetabsdate\fP, and \fIgetdate\fP are replaced by
  2083. \fIconvdate\fP.
  2084. More importantly, \fInewslock\fP does not lock \fIinnd\fP; it is best
  2085. to remove it.
  2086. .PP
  2087. The following files are replaced by INN configuration files.
  2088. You should delete them, just to avoid confusion:
  2089. .DS
  2090. .ta 1.5i
  2091. mailname    sys
  2092. mailpaths    whoami
  2093. organization
  2094. .DE
  2095. If you have other software that uses them (except \fIsys\fP),
  2096. you can keep them.
  2097. The following will be rebuilt (or overwritten) by \fIinnd\fP and
  2098. \fIscanlogs\fP so you should remove them:
  2099. .DS
  2100. .ta 1.5i
  2101. errlog    log
  2102. .DE
  2103. .PP
  2104. In addition to the manpages for the programs listed above, the following
  2105. manual pages should be removed:
  2106. .DS
  2107. .ta 1.5i
  2108. active.times.5    newsmail.8
  2109. expire.8    newsmaint.8
  2110. mkgrdates.8c    nntpd.8c
  2111. news.5    nntpxmit.1
  2112. newsaux.8
  2113. .DE
  2114. .PP
  2115. Any other files and directories can probably also be discarded.
  2116. .\"
  2117. .bp
  2118. .SH
  2119. Appendix III:  Setting up different feeds
  2120. .PP
  2121. This section gives some notes and advice on how to set up different
  2122. types of outgoing news feeds.
  2123. It duplicates and expands upon the information in the manual pages.
  2124. .NH 0
  2125. Ihave/sendme feed
  2126. .PP
  2127. For a standard UUCP newsfeed, a site batches up all the articles it
  2128. receives and sends them to the downstream site, which unpacks the batch
  2129. and processes each article.  If the downstream site has multiple feeds,
  2130. however, it might want to ``filter'' the articles that get sent.  This is
  2131. done by having the feeding site send a list of Message-ID's as an
  2132. ``ihave'' control message.  The receiving site examines the list to see
  2133. which articles it does not currently have, and sends it back to the
  2134. upstream site as a ``sendme'' message.  The original site receives this
  2135. message and prepares a batch in the standard way.
  2136. .PP
  2137. Note that this has nothing to do with NNTP.  It is a specialized type of
  2138. batched feed that is not used very often.
  2139. To do ihave/sendme with a site named remote, the local site must either
  2140. have a ``to.remote'' newsgroup or be compiled with MERGE_TO_GROUPS set to
  2141. \&``DO''
  2142. .PP
  2143. Accepting an ihave/sendme feed is easy.  Suppose an ``ihave'' message is
  2144. received from a site named remote.  When \fIinnd\fP processes the message
  2145. it will invoke the appropriate control script,
  2146. \fI/usr/local/news/bin/control/ihave\fP.  The script will filter the body
  2147. using \fIgrephistory\fP, creating a list of Message-ID's not found in the
  2148. \fIhistory\fP database.  It uses this output to create a ``sendme''
  2149. control article which is posted to the ``to.remote'' newsgroup using
  2150. \fIinews\fP.  This article will then be queued and sent to remote in the
  2151. normal way.  The remote site will then send the desired articles back.
  2152. .PP
  2153. Providing an ihave/sendme feed is a bit more complicated.  First, you must
  2154. create two entries in your \fInewsfeeds\fP file.  The first should be
  2155. named remote.ihave.  Make this a ``Tf,Wm'' feed that contains the remote's
  2156. subscription list.  This entry results in a a file that accumulates the
  2157. Message-ID's of all articles that remote might want.  The other entry
  2158. should be named remote.  This should be a ``Tf,Wn'' feed that only
  2159. subscribes to the ``to.remote'' newsgroup.
  2160. (Actually, if you feed some groups as a standard feed, you can put them
  2161. on the remote entry, rather then the remote.ihave entry.)
  2162. .PP
  2163. The next step is to have the ``ihave'' control messages sent out.  To do
  2164. this, review the \fIsend-ihave\fP script and make sure it is invoked as
  2165. needed (usually out of \fIcron\fP).  It splits the batchfile from the
  2166. remote.ihave \fInewsfeeds\fP entry and posts ``ihave'' control messages
  2167. into the ``to.remote'' newsgroup.  These messages will get queued for the
  2168. remote entry.
  2169. .PP
  2170. The next step is to send out any articles queued for the remote entry.
  2171. Treat this as a standard UUCP feed, invoking \fIsend-uucp\fP or
  2172. \fIsendbatch\fP as appropriate, typically a few minutes after
  2173. \fIsend-ihave\fP runs.
  2174. .PP
  2175. When the remote site receives the ``ihave'' message it will filter it and
  2176. send back a ``sendme'' message whose body is the list of desired
  2177. Message-ID's.  When \fIinnd\fP processes this message it will invoke the
  2178. appropriate control script, \fI/usr/local/news/bin/control/sendme\fP.  This
  2179. script will call \fIgrephistory\fP to turn the list into a list of files
  2180. appended to the batchfile for remote.  Examine this script (the filename
  2181. should probably match the filename in the remote \fInewsfeeds\fP entry)
  2182. and send the batch to the remote site (using \fIbatcher\fP, often called by
  2183. \fIsend-uucp\fP or \fIsendbatch\fP).
  2184. .NH 1
  2185. Feeding a large number of sites
  2186. .PP
  2187. \fIInnd\fP tries to keep as many batchfiles open for as long as possible.
  2188. It will normally open as many as it can, using all the available
  2189. descriptors minus a fixed number for internal use (log files, etc.).
  2190. You can explicitly set the number of files to open by using the ``\-o'' flag.
  2191. .PP
  2192. If you have more outgoing feeds than available descriptors, \fIinnd\fP
  2193. will recycle the files on a a ``least recently used'' basis.
  2194. If most of your feeds get most articles (or you have vastly more feeds
  2195. then available descriptors), this will lead to ``file thrashing,'' closing
  2196. and opening all the excess feeds on each article.
  2197. To reduce this, you can have \fIinnd\fP use an internal buffer for a site
  2198. by using the ``I'' parameter in the \fInewsfeeds\fP file.
  2199. If a site does not have its batchfile open, the server will not try to open
  2200. it until there is more data to be written then will fit in the buffer.
  2201. For example, suppose \fIinnd\fP was started with ``\-o10'' and there
  2202. are 12 sites, all with ``I512'' in their \fInewsfeeds\fP entry.
  2203. If each article generates 50 bytes (a pathname and a Message-ID), then
  2204. \fIinnd\fP will close and re-assign two descriptors every 10 or so articles.
  2205. .PP
  2206. A better alternative is to use funnels and an exploder.
  2207. Funnels, specified in the \fInewsfeeds\fP file, let multiple sites send
  2208. their output down a single stream.
  2209. The advantage of funnels is that this stream can be a channel; the primary
  2210. disadvantage is that the funnel specifies what data is to be written,
  2211. not the individual sites.
  2212. (Since most feeds will want either ``Wn'' or ``Wnm'' entries, this is
  2213. usually not a problem.)
  2214. .PP
  2215. In order for the funnel output to be useful, it usually must be split into
  2216. individual, per-site, files.
  2217. Programs that do this type of splitting are called ``exploders.''
  2218. INN provides two exploders, \fIfilechan\fP and \fIbuffchan\fP.
  2219. .PP
  2220. \fIFilechan\fP is the simplest, and most inefficient, exploder.
  2221. It does not keep any files open and is very system-call intensive.
  2222. It can be used to provide behavior (and performance!) that is similar to
  2223. B2.11 \fIinews\fP.
  2224. It can, however, be used as the funnel for an unlimited number of sites.
  2225. .PP
  2226. \fIBuffchan\fP keeps all its output files open all the time.
  2227. It should not be used for more sites then a single process can have open.
  2228. \fIBuffchan\fP also has flags to automatically flush its files, as well
  2229. as close and re-open them, every specified number of articles.
  2230. (The re-open capability is useful for things like \fInntplink\fP in its
  2231. \&``watch the batchfile'' mode.)
  2232. Using \fIbuffchan\fP with the ``\-l1\ \-c50'' flags will give behavior
  2233. that is similar to the C News \fIrelaynews\fP.
  2234. .PP
  2235. \fIBuffchan\fP can be run as a full exploder (``Tx'') in the
  2236. \fInewsfeeds\fP file.
  2237. This means that you can use \fIctlinnd\fP to send a command line down
  2238. \fIbuffchan\fP's input stream.
  2239. (\fIInnd\fP will also send a command whenever newsgroups are modified.)
  2240. The only useful message is ``flush'' which will close, and re-open, the
  2241. specified site files.
  2242. You should also note that the flow is one-way; full exploders cannot send
  2243. any acknowledgement back.
  2244. .NH 1
  2245. Master/slave replication
  2246. .PP
  2247. INN supports a simple model of replicated news databases:
  2248. a single master host pushes out updates to its slaves.
  2249. The master is the only host that receives articles \(em this includes
  2250. both outside newsfeeds and articles written by local users.
  2251. The slaves only receive articles from the master.
  2252. .PP
  2253. No special work is required to set up a master host.
  2254. .PP
  2255. A slave is set up by starting \fIinnd\fP with the ``\-S'' flag to specify
  2256. the name or IP address of the master host.
  2257. This should be done by modifying the ``FLAG'' variable in your
  2258. \fI_PATH_NEWSBOOT\fP script.
  2259. If \fIinnd\fP is started with the ``\-S'' flag it will pass this flag on
  2260. to \fInnrpd\fP.
  2261. This means that when anyone connects to the slave and does a ``POST'' command,
  2262. \fInnrpd\fP will connect to the master and offer the article.
  2263. .PP
  2264. Since the \fInnrpd\fP on the slave host will usually add its name to
  2265. the Path header, you should add ``Ap'' to the \fIflags\fP field of
  2266. the slave's entry on the master.
  2267. .PP
  2268. Once the slave has been set up it is necessary to have the master feed it.
  2269. This is done by using an extension to the NNTP protocol.
  2270. This extension, the ``XREPLIC'' command, is is documented in \fIinnd.8\fP.
  2271. In order to do this you will have to set up a \fInewsfeeds\fP entry for
  2272. the slave.
  2273. This should be a standard entry except that you will need to have both
  2274. the filename and the replication information written int the batchfile.
  2275. To do this, put ``WnR'' in the \fIflags\fP field of the entry.
  2276. .PP
  2277. When you want to actually send the articles to the slave site you will
  2278. have to specify the ``\-S'' flag in your \fIinnxmit\fP command.
  2279. Current versions of \fInntplink\fP use the ``\-x'' flag.
  2280. .PP
  2281. When running as a slave, \fIinnd\fP is very paranoid about staying synchronized
  2282. with its master.
  2283. Most noticeably, you should make sure that all newgroup and rmgroup control
  2284. messages are handled identically on both systems.
  2285. .\"
  2286. .bp
  2287. .SH
  2288. Appendix IV:  First-time Usenet or NNTP Installation
  2289. .PP
  2290. Since the needs and administration of systems varies so much, I can
  2291. only give some general guidelines and advice in this section.
  2292. Like 
  2293. .UX
  2294. system administration in general, it is unfortunately still true that
  2295. most of the job will be learned ``in the heat of the moment.''
  2296. Once you have INN set up, however, it should not require much attention.
  2297. For general problems, try posting to ``news.sysadmin'';
  2298. use ``news.software.nntp'' and ``news.software.b'' for installation problems.
  2299. .PP
  2300. Once all the software has been compiled and installed, you must now
  2301. get a newsfeed.
  2302. This involves having one (or more) sites pass along to you all the
  2303. articles that they have received.
  2304. Getting articles is a passive action, because it is generally more
  2305. efficient that way.
  2306. (The \fInntpget\fP program is primarily a debugging aide and utility
  2307. program.
  2308. It is not the recommended way to get a newsfeed, and most sites will
  2309. prefer you not to use it for that.)
  2310. .PP
  2311. If you already have Usenet access, you could post a note to ``news.admin''
  2312. asking for a feed.
  2313. Make sure to say that you are looking for an NNTP connection!
  2314. If you are a member of an NSFNet regional network, or subscribe to
  2315. a commercial IP network, ask your contact there at the network center.
  2316. If they do not provide feeds directly, they can probably help you find
  2317. one.
  2318. You also might try writing to the <nntp-managers@colossus.apple.com>
  2319. mailing list.
  2320. This will reach the news administrators of many NNTP sites on the Internet.
  2321. (If you want to join the list, remember to send it to
  2322. nntp-managers-request, \fBnot\fP nntp-managers!)
  2323. .PP
  2324. Once have a site willing to give you a feed, you need to get the
  2325. list of groups that they will give you.
  2326. You also need to create those groups on your machine.
  2327. The easiest way to do this is usually to ask them for a copy of
  2328. their active file, and for you to add the entries of the groups that
  2329. you're interested in.
  2330. .PP
  2331. Once the groups are set up, your newsfeed will periodically connect to
  2332. your NNTP server and offer it any new articles that have arrived since the
  2333. last connection.
  2334. \fIInnd\fP will accept the connection, receive the articles, and
  2335. queue them up for any sites that you feed.
  2336. .PP
  2337. The next step is to set it up so that your articles are sent back to
  2338. your newsfeed.
  2339. To do this, create a \fInewsfeeds\fP entry, using the same name that shows
  2340. up in the Path header that you see.
  2341. (If you use a different name, then use the ``excludes'' sub-field to avoid
  2342. offering back everything they offer you.)
  2343. This is usually done by giving them all non-local articles as a file
  2344. feed.
  2345. For example, ``Foo, Incorporated'' does not give any foo.* articles to
  2346. anyone else.
  2347. .PP
  2348. When someone at your site writes an article, \fIinnd\fP will record the
  2349. filename in the batch file for your upstream site.
  2350. Either \fIsend-nntp\fP or \fInntpsend\fP will flush and lock the batchfile,
  2351. and then call \fIinnxmit\fP to connect to the remote site and send these
  2352. queued articles out.
  2353. You should edit the script to list the sites you want, and arrange for
  2354. \fIcron\fP to run this script on a regular basis.
  2355. You can run it as often as you like, but 10 minutes is a common interval.
  2356. .PP
  2357. If you want to feed any sites via UUCP, then you will have to set
  2358. up file feed entries for them in the \fInewsfeeds\fP file, and arrange
  2359. to have \fIcron\fP run the \fIsend-uucp\fP script as desired.
  2360. (UUCP batches are typically only done every few hours.)
  2361. .PP
  2362. Once you have news flowing in and out of the system, you will have
  2363. to expire it or your disks will fill up.
  2364. The \fInews.daily\fP script should be run by \fIcron\fP in the middle
  2365. of the night.
  2366. It will summarize that day's log files, and then call \fIexpire\fP to
  2367. purge old news.
  2368. You might also want to have \fIcron\fP run \fIrnews\fP hourly to pick
  2369. up any stalled batches.
  2370. Finally, if your feeds change IP address, you might want a daily job
  2371. that does ``ctlinnd reload hosts.nntp "flush cache"''.
  2372. This is because \fIinnd\fP does not currently time-out DNS entries.
  2373. .PP
  2374. You will generally want to set up the \fIcron\fP jobs
  2375. so that they are run as the news administrator, and not as root.
  2376. A good version of \fIcron\fP that makes it easy to do this can be found
  2377. on gatekeeper.dec.com in pub/misc/vixie/cron.tar.Z.
  2378. .PP
  2379. You will also need to get one or more programs to read news.
  2380. There are several freely-available programs around.
  2381. \fIRn\fP is popular, and is probably the best place to start.
  2382. The official distribution is available for anonymous FTP at tmc.edu
  2383. in the \fIrn\fP directory.
  2384. .PP
  2385. Welcome to Usenet, and have fun!
  2386. .\"
  2387. .bp
  2388. .SH
  2389. Appendix V:  News overview database
  2390. .PP
  2391. There are now many newsreaders available that are able to do ``threading.''
  2392. This is the ability to track a discussion within a newsgroup by using
  2393. the References header (or other data), regardless of changes in headers
  2394. like the Subject line.
  2395. Examples of these readers include \fInn\fP, \fItrn\fP, and \fIgnus\fP,
  2396. and more are becoming available.
  2397. Until recently, a major problem with these readers is that they all
  2398. required a specialized external database that contained the threading
  2399. data.
  2400. .PP
  2401. In late 1992, Geoff Collyer <geoff@world.std.com> released the \fInov\fP,
  2402. or ``news overview,'' package.
  2403. This included database tools and, and client access routines,
  2404. that let the current threaded newsreaders use a common, textual,
  2405. database.
  2406. An overview database typically adds adds about 7-9% to your storage
  2407. requirements.
  2408. By default, the overview files are stored in the spool directory;
  2409. you can change this to use an alternate tree that mirrors the spool
  2410. hierarchy by changing the \fI_PATH_OVERVIEWDIR\fP parameter.
  2411. .PP
  2412. INN includes full support for creating and expiring news overview databases.
  2413. To do this, add an entry like the following to your \fInewsfeeds\fP file:
  2414. .DS
  2415. overview:*:Tc,WO:/path/to/bin/overchan
  2416. .DE
  2417. (Make sure to replace \fI/path/to/bin\fP with the value of your
  2418. \fI_PATH_NEWSBIN\fP parameter.)
  2419. Then reload the \fInewsfeeds\fP file or restart your server.
  2420. To create the initial database, run the following command after you have
  2421. started \fIoverchan\fP:
  2422. .DS
  2423. expireover -a -s
  2424. .DE
  2425. You will also need to expire the overview data.
  2426. The easiest way to do this is to add the ``expireover'' keyword to
  2427. the \fIcron\fP job that runs \fInews.daily\fP.
  2428. .PP
  2429. The \fInnrpd\fP server includes two command extensions to access the database;
  2430. they are documented in the ``protocol extensions'' part of \fIdoc/nnrpd.8\fP.
  2431. INN does not include any client code or modifications to any newsreaders
  2432. to use the overview data.
  2433. Most maintainers have agreed to support the overview database, including
  2434. the INN extensions for remote access.
  2435. You can find prototype versions of many readers (work done by Geoff) on
  2436. world.std.com in the directory src/news; look for files named
  2437. \fIreader\fP.dist.tar.Z.
  2438. .\"
  2439. .bp
  2440. .SH
  2441. Appendix VI:  Limited MIME Support
  2442. .PP
  2443. This version of INN includes limited support for MIME, the Multipurpose
  2444. Internet Mail Extensions, described in RFC 1341.
  2445. The support is the ability to do limited transport of arbitrary
  2446. MIME messages, and \fInnrpd\fP can add MIME headers to all local postings
  2447. that do not have them.
  2448. .PP
  2449. In addition, there are patches available for \fInntplink\fP that
  2450. allow it to do MIME transport.
  2451. The patches are not (yet) part of the official release; if you need them,
  2452. contact Christophe Wolfhugel <Christophe.Wolfhugel@hsc-sec.fr>; he did
  2453. most of the INN work, too.
  2454. .PP
  2455. You should be very careful if you have \fInnrpd\fP add MIME headers.
  2456. To do this, edit \fIinn.conf\fP as indicated in \fIdoc/inn.conf.5\fP.
  2457. Once this is done, \fBall\fP articles posted will get MIME headers added.
  2458. Existing MIME headers will not be modified, but missing ones will be added.
  2459. The default values to add to \fIinn.conf\fP are these:
  2460. .DS
  2461. mime-version: 1.0
  2462. mime-contenttype text/plain; charset=us-ascii
  2463. mime-encoding: 7bit
  2464. .DE
  2465. An internationalized site might want to use these values:
  2466. .DS
  2467. mime-version: 1.0
  2468. mime-contentType: text/plain; charset=iso-8859-1
  2469. mime-encoding: 8bit
  2470. .DE
  2471. It is possible to use these values because INN provides a clean eight-bit
  2472. data path.
  2473. Unless you make special arrangements with your peers, however, you
  2474. must transmit seven-bit data.
  2475. Doing this will require special transmit agents.
  2476. Note that \fInnrpd\fP is not a Mime-compatible reader.
  2477. You must have software to extract the data and present it appropriately.
  2478. .PP
  2479. If you configure your site to use seven-bit data, then you must also
  2480. make sure that none of your software creates eight-bit articles.
  2481. \fINnrpd\fP does not verify this.
  2482. If you configure your site to use eight-bit data, then ASCII works fine,
  2483. but remember that in quoted-printable long lines are cut and
  2484. that the equal sign (``='') is quoted; this is really bad for source code
  2485. postings, among others.
  2486. .PP
  2487. The character set can also cause problems.
  2488. If you use ``iso-8859-1'' you must make sure that your posting software
  2489. uses this character set (e.g., not CP-437 under MS-DOS) because \fInnrpd\fP
  2490. does not do any conversion.
  2491. .PP
  2492. In general, be very cautious.
  2493. .PP
  2494. MIME articles can only be sent using \fIinnxmit\fP; work on \fIbatcher\fP
  2495. is in progress.
  2496. Unless the ``\-M'' flag is used, no MIME conversions are done.
  2497. If the flag is used, the following happens:
  2498. Articles with a Content-Transfer-Encoding header of ``8bit'' or ``binary''
  2499. are forwaded in ``quoted-printable'' format (the ``base64'' format will
  2500. be available soon).
  2501. All other articles -- in particular, those without MIME headers, those of
  2502. type ``message'' or ``multipart,'' those with Content-Transfer-Encoding
  2503. header of ``7bit'' -- are forwarded without any change.
  2504.